Thursday, February 11, 2016

Linux - Schedule one time job using at

Schedule a job to execute at a specific time
$ at time date
$ at 12 pm july 4

2. Schedule an at job using a time + specified time
$ at now + COUNT Unit
$ at now + 15 min
$ at now + 1 hour
$ at now + 1 day
$ at now + 1 week
$ at now + 5 years
$ at midnight


3. List scheduled jobs
$ atq or at -l -->> notice the job number on first field

4. Check the content of a scheduled job
$ at -c <job id#>

6. Remove schedule jobs
$ atrm <job#>

7. Send an email once the job is complated
$ at 12:49 -m

Run a script at 12.30
$ at 12:32 -m -f /data/onetime.jobs

No comments:

Post a Comment