Crontab scheduled task instance and crontab task instance

Source: Internet
Author: User

Crontab scheduled task instance and crontab task instance

Instance 1: Execute myCommand once every minute

* *** MyCommand

Instance 2: 3rd and 15th minutes per hour

3, 15 * myCommand

Instance 3: Run at 3rd and 15th minutes from eight o'clock A.M.

3, 15 8-11 *** myCommand

Instance 4: runs every two days, from eight o'clock A.M. to, at 3rd and 15th minutes.

3, 15 8-11 */2 ** myCommand

Instance 5: runs every 3rd and 15th minutes from eight o'clock A.M. to on Monday.

3, 15 8-11 ** 1 myCommand

Instance 6: restart smb at every night

30 21 ***/etc/init. d/smb restart

Instance 7: restart smb at on the 1st, 10th, and 22th of every month

45 4, 10, 22 **/etc/init. d/smb restart

Instance 8: restart smb every Saturday or Sunday

10 1 ** 6, 0/etc/init. d/smb restart

Instance 9: restart smb every 30 minutes between and every day

0, 30 18-23 ***/etc/init. d/smb restart

Instance 10: restart smb at every Saturday.

0 23 ** 6/etc/init. d/smb restart

Instance 11: restart smb every hour

**/1 ***/etc/init. d/smb restart

Instance 12: restart smb every hour between PM and PM.

0 23-7 ***/etc/init. d/smb restart

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.