I am trying to schedule a one time job with the at
utility. I am trying:
at 13:00
, then hitting enter, then
<name_of_shell_script>
,
then ctrl+d
.
The top line of my script is: #!/bin/zsh
but it is never executed. It executes when run manually, but not when scheduled with the at utility.
Since you're using zsh, try using sched
instead:
.zshrc
file:
zmodload zsh/sched
sched 13:00 <absolute path to shell script>
See http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-zsh_002fsched-Module for more info.
Also, make sure your script file is actually set as executable:
chmod a+x <absolute path to shell script>