linux crontab operation for scheduled tasks

Common parameters:

crontab -l //View the cron tasks under the current user

crontab -e //Edit the current user's scheduled tasks

crontab -u linuxso -e //Edit the user linuxso's scheduled tasks

* * * * * command time-
sharing day and month The weekly command


 cron is a timing execution tool under linux that can run jobs without human intervention.
  /sbin/service crond start //Start the service
  /sbin/service crond stop //Close the service
  /sbin/service crond restart //Restart the service
  /sbin/service crond reload //Reload the configuration
  /sbin/service crond status // View the service status



You can create a scheduled task script for the root user in the /var/spool/cron directory,

#/var/spool/cron/root
# back files every 2:30
*  *  *  *  * /root/sbin/backupFiles.sh >> /var/log/backup.log


Troubleshooting
can view logs
/var/log/cron
/var/spool/mail/root


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326074459&siteId=291194637
Recommended