My Previous post talks about sending automated emails using mutt.
How do we automate this process say every hour
Then we setup crontab to get this up and running.
Below are few of the options which crontab gives.
crontab -e Edit your crontab file, or create one if it doesn’t already exist.
crontab -l Display your crontab file.
crontab -r Remove your crontab file.
crontab -v Display the last time you edited your crontab file.
crontab -r Remove your crontab file.
crontab -v Display the last time you edited your crontab file.
Steps
- Enter: $ crontab -e
- If you have not configured EDITOR it will ask for it set which ever you are comfortable with.
- Enter your time to execute command information, below is how you give it.
----------------------------------------------
----------------------------------------------
# Every Minute
# m h dom mon dow command
* * * * * /home/ahmed/executeMyMuttScript.sh
----------------------------------------------
# Every Hour at zero minute
# m h dom mon dow command
0 0-23 * * * /home/ahmed/executeMyMuttScript.sh
----------------------------------------------
# Every Hour at 30th minute (1:30, 2:30, 3:30 ...)
# m h dom mon dow command
30 * * * * /home/ahmed/executeMyMuttScript.sh
----------------------------------------------
Comments
Post a Comment