Stars Explaination
* * * * *
1st * – Minute of a hour.
1 * * * * /command path with command name – this will run hour @ 1st minute,
2nd * – hour of a day
* 1 * * * /command path with command name – this will run every day @ 1’O clock,
* */1 * * * /command path with command name – this will run every 1 hour.
3rd * – Day of a month.
 * * * * * * /command path with command name – to run Every day.
or
you can put number, eg. * * 2 * * /command path with command name
4th * – Month of the  year
for January & February eg. * * * 1,2 * /command path with command name
5th * – Day of the week.
for every day of the week, You need put *,
or
0 for Sunday, 1 for Monday & so on, eg. * * * 0 * /command path with command name
or
say, if you want to run cron on Monday & Saturday,  * * * 1,6 * /command path with command name
1). Login in to Linux server Via SSH
shell # crontab –e
* */6 * * * /etc/init.d/httpd restart
* */4 * * * /etc/init.d/mysql restart
This will restart the httpd (web) every 6 hours & restart the mysql every 4 hours.

About The Author

Leave a Reply

Your email address will not be published. Required fields are marked *