Use of DISPATCH commands
General Command execution
[Email protected]/]# date >>/home/mydate.txt#--------------------------- View effects---------------------------------[[email protected]/]# Cat/home/mydate.txtmon 07:04:56 EDT 2015
2. Execution of DISPATCH commands
[[email protected]/]# Crontab-eno crontab for root-using an empty one* * * * * Date >>/home/mydate.txt# time of the moon Week #* * * * * represents #0 per minute 2 * * * for daily 2:00#0 2 3 * * for 3rd monthly 2:00#0 2 3 4 * for April 3 2:00#0 2 * 0 for 2:00# per Monday------------------- --------viewing effects---------------------------------[[email protected]/]# Cat/home/mydate.txtmon 07:04:56 EDT 2015Mon 07:07:01 EDT 2015Mon 07:08:01 EDT 2015Mon 07:09:01 EDT 2015
3. Dispatching commands by invoking execution files
[Email protected]/]# vi/home/mydate.shdate >>/home/mydate2.txt[[email protected]/]# chmod 744/home/mydate.sh[ [Email protected]/]# crontab-e* * * * */home/mydate.sh#--------------------------- View effects---------------------------------[[email protected]/]# Cat/home/mydate2.txtmon 07:14:01 EDT 2015
Linux_5day------------using the crontab Dispatch command