XenServer: Schedule tasks to automatically clean up system logs

The Linux system performs tasks regularly, which is very useful for regularly cleaning system logs and restarting services. The command is as follows:
this command will not be introduced much, there are many detailed explanations under Baidu

For example : I want to delete the log regularly, once a day, enter the following command
crontab -e
to copy the code
keyboard "a" Edit, enter the following execution time to execute the task/program
* * */1 * * rm -rf /var/log/* * * */ 1 * * /etc/init.d/syslog
restart hours * * */1 * * day * * * */1 * week * * * * */1 month *1 * * * * first minute of every hour * *1 * * * first hour of every day * * *1 * * First day of the week * * * *1 * First day of every month * * * * *1 First month of every year












Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326655067&siteId=291194637