Scheduling A Job To Occur Once Using at
There are various tools for sending a message to the screen including xmessage which is very basic and the one I like to use which is kind of novel called xcowsay.
xcowsay displays a picture of a cow and the message you would like displayed within a speech bubble.
- at 9:45 PM - runs command at 9:45 pm
- at 10:00 AM - runs command at 10:00 am
- at 9:30 PM tomorrow - runs command at 9:30 pm tomorrow
- at 4:00 PM + 3 days - runs command 3 days from now at 4 pm
- at 10:00 AM Jun 25 - runs command at 10 am on June 25th
Scheduling A Recurring Job Using cron
For instance, if I work from home between Monday and Friday I might want to be notified when it is lunchtime and to schedule drinks breaks.
To schedule a task you have to use the crontab -e command which opens a file as follows:
The command in the above screenshot displays the message "Have lunch" every weekday at 12:30.
The timings look a bit weird when you first see them but basically from left to right they are:
- Day Of Month
- Day Of Week