The “at” command

The at command is very useful when you want to submit a job at a later time. at reads commands from standard input or a specified file which are to be executed at a later time.

For example, if you want to run script.sh at 4:15 AM…

at 4:15am < script.sh

Note that if the time is already past, the next day is assumed.

If you want to run a job in 15 minutes…

cat script.sh | at now + 15 minutes

at now +” allows you to specify minutes, hours, days, or weeks. You could even tell at to run the job today or tomorrow by changing now with today or tomorrow.

at -f script.sh tomorrow 1:30pm

References:

Leave a Reply

You must be logged in to post a comment.