Linux crontab brief demo

<pre>
Some examples crontab file:

30 21 * * * /usr/local/etc/rc.d/lighttpd restart
the example above indicates night 21:30 restart apache.

45 4 1,10,22 * * /usr/local/etc/rc.d/lighttpd restart
the above example is 1, 10, 422 days per month: 45 restart apache.

10 1 * * 6,0 /usr/local/etc/rc.d/lighttpd restart
the above examples represent every Saturday, Sunday 1: 10 to restart apache.

0,30 18-23 * * * /usr/local/etc/rc.d/lighttpd restart
the above example are shown in day 18: 00-23: 00 every 30 minutes to restart apache.

0 23 * * 6 /usr/local/etc/rc.d/lighttpd restart
the above examples represent every Saturday in 11: 00 pm restart apache.

* * / 1 * * * /usr/local/etc/rc.d/lighttpd restart
every hour restart apache

* * * * 23-7 / 1 /usr/local/etc/rc.d/lighttpd restart
between 11 pm to 7 am, every hour restart apache

0 11 4 * mon-wed /usr/local/etc/rc.d/lighttpd restart
the monthly number 4 and 11:00 from Monday to Wednesday to restart apache

* /Usr/local/etc/rc.d/lighttpd Jan. 4. 1 0 the restart
. 4 point reboots of January 1 Apache
</ pre>

Guess you like

Origin www.cnblogs.com/newmiracle/p/11876197.html