Mac/linux timed Run command line

Source: Internet
Author: User

If you want to start the operation, you can use the Mac's own Automator will run the command package into an app, and then in the user group "start at Login" list plus that app.

But you can't do that if you want to run it on a regular basis, using a command called crontab (or software?). )

The practical instructions are only 3, very brief.

Edit a Scheduled Task list

Crontab-e

Show all Scheduled Tasks list

Crontab-l

Delete all Scheduled Tasks list

Crontab-r

And you can get through

crontab [file]

To put the configuration file in any location to crontab. As long as your files are legitimate text.

Like what

Crontab ~/autoscripts/.crontab

The exact configuration file format is also simple

Each row has 6 elements, the first 5 elements are time, and the order represents

Minute Hour month date week

Can be a number representing only that number, or "0-10" to indicate a period of time, or an asterisk (*) to indicate any time

Like what

* * * * * * Say hello

The delegate runs say hello at any time (i.e. every minute) on the console, that is, read out Hello

5 1 say fuckyou

It's a 5-point computer yelling "fuck♂you" every Monday morning.

6th element visible is the command to execute

Mac/linux timed Run command line

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.