How to set up scheduled tasks in a SUSE system?

In the SUSE system, you can use the crontab command to set up scheduled tasks. The following are the steps to set up scheduled tasks.

  1. Open the terminal window and use the following command to edit the scheduled task table for the current user:
crontab -e
  1. In the editor, add scheduled tasks in the following format:
* * * * * command

Five asterisks represent minutes, hours, dates, months, and weekdays respectively, with the command being the task to be executed at the scheduled time.

  1. Save and exit the editor, the system will automatically schedule the task.
  2. Use the following command to view the current user’s scheduled tasks:
crontab -l
  1. To delete a cron job, you can use the following command to edit the current user’s cron table and delete the corresponding line:
crontab -e

Please note:

  1. Please make sure the path of the command is correct, as the scheduled task runs without environment variables.
  2. The output of the command will be sent to the current user’s email. If you do not want to receive this output, you can add >/dev/null 2>&1 after the command in the scheduled task.
Leave a Reply 0

Your email address will not be published. Required fields are marked *