Scheduling Tasks with Crontab (Linux Hosting)

If you need to run scripts on your server at specific time, use the task scheduling facility on your server to make the system automatically run the scripts for you.

Important: To prohibit control panel users from scheduling tasks on behalf of user "root", create on the server's file system an empty file with name root.crontab.lock in the location /parallels_plesk_panel_installation_directory/var/.

During installation of Parallels Plesk Panel, the following tasks are automatically created:

As all these tasks are related to domain statistics, databases and reports, it is strongly recommended that you neither change nor remove these tasks.

Note. You can also schedule tasks on a per-domain basis. To do so, follow the same procedures listed below, but instead of going to Settings > Scheduled Tasks, go to Domains > domain name > Scheduled Tasks.

To schedule a task:

  1. Go to Settings > Scheduled Tasks.
  2. Select the system user account on whose behalf the task will be executed.
  3. Click Schedule New Task.
  4. Specify when to run your command:

    You can schedule the time using the UNIX crontab entry format. In this format, you can

    To schedule the task to run every Nth period, enter the combination */N, where N is the legal value for this field (minute, hour, day, month). For example, */15 in the Minute field schedules the task to start every 15 minutes.

    You can type the contracted names of months and days of the week, which are the first three letters: Aug, Jul, Mon, Sat, etc. However, the contracted names cannot be separated with commas or used together with numbers.

  5. Specify which command to run. Type it into the Command input box.

    For example, if you want to run the backup creation task at the specified time and have the backup file sent to your e-mail, you need to specify the following command in the Command input box:

    /usr/local/psa/admin/sbin/backupmng

  6. Click OK.

To temporarily suspend execution of a scheduled task:

  1. Go to Settings > Scheduled Tasks.
  2. Select the system user account on whose behalf the task is executed.
  3. Locate the task that you want to suspend and click on the command name.
  4. Clear the Switched on check box and click OK.

To resume execution of scheduled task:

  1. Go to Settings > Scheduled Tasks.
  2. Select the system user account on whose behalf the task is executed.
  3. Locate the task whose execution you want to resume and click the command name.
  4. Select the Switched on check box and click OK.

To cancel a task:

  1. Go to Settings > Scheduled Tasks.
  2. Select the system user account on whose behalf the task is executed.
  3. Select a check box to the left of the task that you want to cancel.
  4. Click Remove.
  5. Confirm removal and click OK.