Recurring schedule (a cron daemon):

Source: Internet
Author: User

Recurring Plan (a cron daemon): [email protected]:/etc# Ps-ef |grep cronroot903 1 0 16:25? 00:00:00/usr/sbin/cron-Froot16162 6459 0 22:08 pts/1 00:00:00 grep--color=Auto Croncron is a daemon that can be executed periodically based on the combination of time, date, month, and week. (Can be stopped and restarted) [email protected]:/etc# Service cron Stop[email protected]:/etc# Ps-ef |grep cronroot16212 6459 0 22:09 pts/1 00:00:00 grep--color=Auto Cron[email protected]:/etc# Service cron Start[email protected]:/etc# Ps-ef |grep cronroot16252 1 3 22:09? 00:00:00/usr/sbin/cron-Froot16263 6459 0 22:09 pts/1 00:00:00 grep--color=Auto Cron (start in different modes) [email protected]:/# service cron status Cron.service-Regular Background Program processing daemon loaded:loaded (/lib/systemd/system/cron.service; vendor Preset:ena Active:active (running) since four2018-02-15 22:09:54PST; 17min ago Docs:man:cron (8) Main PID:16252(cron) Tasks:1Memory:1. 1M cpu:30ms CGroup:/system.slice/cron.service└─16252/usr/sbin/cron-F[email protected]:/# sysv-rc-conf--List Croncron2:on 3:on 4:on 5:on

* Indicates that this time does not exist (0 and 7 for Sunday). January 2 3:50 Go to execute a program. This time is taken from the current operating system.

[Email protected]:/# crontab-L (View time plan) No crontab forRoot (no executable time scheduled task for root account) [email protected]:/# crontab-e (Call text edit, edit time Plan)*/1 * * * * echo "Yowen" >>/yw/cron.txt (print one output per minute) [email protected]:/# crontab-L (There is a time plan) LS1 * * * * echo "Yowen" >>/yw/Cron.txt[email protected]:/# service Cron Reload (restart daemon cron)* Reloading configuration files forperiodic command Scheduler cron [OK] [email protected]:/yw# Service Cron Restart (create 2 accounts) [email protected]:/yw# useradd zhangsan[email protected]:/yw# useradd lisi[email protected]:/yw# passwd zhangsanenterNewUNIX Password:retypeNewUNIX Password:passwd:password updated successfully[email protected]:/yw# passwd lisienterNewUNIX Password:retypeNewUNIX Password:passwd:password updated successfully[email protected]:/# crontab-r (delete task) [email protected]:/yw# Service cron Restart (delete task, also restart) [email protected]:/etc# vim Cron.deny (account Zhangsan cannot use cron Scheduled Tasks) Zhangsan[email protected]:~$ Su-Zhangsanpassword:no directory, logging in with HOME=/$ crontabyou (Zhangsan) is not allowed ThisProgram (crontab) See Crontab (1) fo

Cron mainly depends on the time setting and User Level control.

Recurring schedule (a cron daemon):

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.