Add the scheduled Task Command crontab-e in CentOS
Restart teamviewer every two hours to prevent external connection to the console and execute: crontab-e // enter the timer editing page. Add the following command: control + c! Wq save 0 */2 *** teamviewer deamon restart0 */2 *** echo "Have a break now. ">/tmp/test.txt each field is separated by spaces or tabs. The format is as follows:MinutehourDay-of-monthmonth-of-yearThe valid value of day-of-weekcommands is 00-59 00-23 01-31 01-12 0-6 (0 is Sunday) commands (representing the script to be executed). Example: every morning at, **** echo "Good morning. ">/tmp/test.txt // note that no output is visible from the screen with pure echo, because cron has emailed any output to the root mailbox. 0 */2 *** echo "Have a break now every two hours. ">/tmp/test.txt every two hours from PM to AM and am, 8 *** echo "Have a good dream">/tmp/test.txt am, am. command line, January 1, January 1 1 1 * command line SHELL =/bin/bash PATH =/sbin: /bin:/usr/sbin:/usr/bin MAILTO = root // if an error occurs or data is output, send data to the account HOME =/execute/etc/cron every hour. hourly script 01 *** root run-parts/etc/cron. hourly runs/etc/cron every day. d Aily script 02 4 *** root run-parts/etc/cron. run/etc/cron every week in daily. weekly script 22 4 ** 0 root run-parts/etc/cron. weekly executes/etc/cron every month. monthly script 42 4 1 ** root run-parts/etc/cron. monthly note: "run-parts" is the parameter. If this parameter is removed, you can write a script name to be run later, instead of the folder name. Execute the command at four o'clock P.M., or every day. 5, 15, 25, 35, 45, 55, 16, 17, 18 *** the system enters the maintenance status at every Monday, 3, and 5, and restarts the system. 00 15 ** 1, 3, 5 shutdown-r + 5 10 points per hour, 40 points to execute the innd/bbslin command in the user directory: *** innd/bbslink executes the bin/account command in the user directory every hour: 1 *** bin/account execute the following two commands in the user directory at 03:20 every morning (each command is separated ): 20 3 *** (/bin/rm-f expire. ls logins. bad; bin/expire $ # @ 62; expire.1st) January and April of each year, run the/bin/rm-f expire.1stcommand from 03:12 to 03:55 on the 9th, and paste the result to the end of the mm.txtfile (the mm.txt file is located in your own directory ). 3 4-9 */bin/rm-f expire.1stre%@62%%%%%@62%mm.txt