I was trying to run a .sh script on my OpenBSD machine on startup.
I've made the script executable using the chmod +x command. I've also added the script to cron via an entry reading
@reboot sh /dir/myscript.sh
(no quotes) as well as adding the script via and entry to /etc/rc.d/rc.local and making that executable as well, to no avail.
The script is a basic echo "hello" command. Any tips?
Note: I edited restart to reboot, as I misremembered exactly what I typed in
hellostring? If running correctly (with@reboot, not@restart), you would get the string mailed to you. If running from/etc/rc.local(note the path), you would see it during boot.@restarttag in your crontab. You still don't say what happens when this runs though. The owner of the crontab should get an email with the output of the job, including any error messages. If this happens, can we assume that the issue has been resolved (and that GADR3's answer was correct, and that you may accept that as the correct solution)?