I'm running Ubuntu 14.04 LTS.
Sometimes I use the at
command to run a Bash script one time like this:
at -f goscript 8:00pm
(Execs need me to run a report at a time not in crontab
.)
Is that the correct syntax? Or do I need at -f /path/to/goscript 8:00pm
?
Does at
require the full path to the filename like cron
does? If my script is in /path/to/goscript
will the above command run correctly? Assuming the first line of goscript
is #!/bin/bash
.
I did find this from man at
:
"The working directory, the environment (except for the variables BASH_VERSINFO, DISPLAY, EUID, GROUPS, SHELLOPTS, TERM, UID, and _) and the umask are retained from the time of invocation."
The
at
command doesn't need to be given an absolute path if you are running it from the same location.If you are running it from the same location where you have your script just give the script's name.