Linux crontab: Shutdown name: crontab permission: all users use: www.2cto. comcrontab [-uuser] filecrontab [-uuser] {-l |-r |-e} Description: crontab is used for usage...
When linux crontab is used, the shutdown name is set to crontab. permission: all users can use the following command: www.2cto.com crontab [-u user] file crontab [-u user] {-l |-r |-e} Description: crontab is used to allow users to execute programs at a fixed time or interval. In other words, it is similar to the user's time table. -U user is used to set the time table of the specified user. The premise is that you must have the permission (for example, root) to specify the time table of another user. If-u user is not used, the time table is set. Meal count:-e: run the text editor to set the time table. the preset text editor is VI. if you want to use another text editor, set the VISUAL environment variable to specify the text editor (for example, setenv VISUAL joe)-r: delete the current time table-l: the format of the current time table www.2cto.com is as follows: f1 f2 f3 f4 f5 program where f1 represents minutes, f2 represents hours, f3 represents the day of a month, and f4 represents months, f5 indicates the day of the week. Program indicates the program to be executed. When f1 is *, the program is executed every minute. if f2 is *, the program is executed every hour, and so on. when f1 is a-B, it indicates that it will be executed from minute a to minute B, when f2 is a-B, it indicates that execution is performed from Hour a to hour B, and so on. when f1 is */n, it indicates that execution is performed every n minutes, if f2 is */n, the task is executed every n hours. Similarly, when f1 is a, B, c ,... a, B, c ,... execute in minutes. f2 is a, B, c ,... a, B, c... you can save all settings in the file and use crontab file to set the time table. Www.2cto.com for shutdown program, shutdown, init, and other steps 1 switch to the root user (you can use the su command) step 2 crontab-u root-e open and edit the scheduled task of the root user step 3 set the following scheduled task rule ** 18 ***/sbin/init 0 (note: the commands called in program must use the full path. I didn't do it at the beginning. I always failed !)
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