Understanding "at"
Many a time, we need to schedule a task for a future time, say in the evening at 8 p.m. on a specific day. We can use the at command in such a situation.
Sometimes, we need to repeat the same task at a specific time, periodically, every day, or every month. In such situations, we can use the crontab command.
Let's learn more about the use of the at command. To use the at command, the syntax is as follows:
$ at time dateThe following are examples of the at command:
- The Ctrl + D command will save the
atjob. The task will be executed at 11.15 A.M. This command will log messages to thelog.txtfile at 11.15 a.m.:
$ at 11.15 AMat > echo "Hello World" > $HOME/log.txtat > Control + D
- The following command will send an email on March 31, 2015, at 10 A.M.:
$ at 10am mar 31 2015at> echo "taxes due" | mail jonat> ^D
- The following command will make the task run on May 20 at 11 A.M.:
$ at 11 am may 20- All the jobs that are scheduled by the
atcommand can be listed using the...