One-time job on Linux

at utility is very simple to use, and you can fire off a one-time job without a lot of fuss. Run at time < script.sh and at will run the script and then exit. For example:

at 8am -f script.sh

Will run the script at 8 a.m. -- if it's past 8 a.m., then it will run the job tomorrow. And that's it; the job will run once. 
If you want to see what's scheduled, just use the atq command to see what you will be running. 
Note that the -f option specifies a file for the command input, whereas you can also just provide the commands via standard input (such as using the < script.sh method).

Comments

Popular posts from this blog

How to delete / clear queue of PowerMTA