Got it

Crontab scheduled task

319 0 0 0 0

Crontab scheduled task

With the crontab command, we can execute specified system directives or shell scripts at regular intervals.

The unit of time interval can be any combination of minutes, hours, days, months, weeks, and above. This command is ideal for periodic log analysis or data backup.

The format of the schedule is as follows:

F1 f2 f3 f4 f5 program

Before submitting a crontab file to the cron process, first set the environment variable EDITOR. The cron process uses it to determine which editor to use to edit the crontab file. 9 9 % of UNIX and Linux users use vi. If you do the same, then you can edit the .profile file in the $HOME directory and add a line like this:

EDITOR=vi; export EDITOR

Instance

Execute /bin/ls every 0th hour of every month


0 * * * * /bin/ls

In December, every day from 6 am to 12 am, every 3 hours and 0 minutes is executed /usr/bin/backup


0 6-12/3 * 12 * /usr/bin/backup


Comment

You need to log in to comment to the post Login | Register

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.