How to schedule a task in Plesk for Linux?

Answer

There are two types of scheduled tasks in Plesk:

      • Customer scheduled tasks. This type of tasks can be created by both Customers and Administrators. They are executed on behalf of a system user. Such tasks do not provide access to the filesystem outside of the document root of the web site.
      • Administrator scheduled asks. This type of tasks can be created by Administrators only. They are executed on behalf of the root user. Such tasks provide write access to the whole filesystem.

How to schedule a Customer scheduled task from Plesk UI:

      1. Log in to Plesk
      2. Go to Websites & Domains > example.com > Scheduled Tasks > Add Task.
      3. In the Command field put the full path to the script to be executed.
      4. In the Run field set the the task execution time.
      5. Click OK to save changes.

How to schedule an Administrator scheduled task from Plesk UI:

      1. Log in to Plesk
      2. Go to Tools & Settings > Scheduled Tasks > Add Task.
      3. In the Command field, put the full path to the script to be executed.
      4. In the Run field, set the the task execution time.
      5. In the System user field, leave user as root or choose another system user to run the task:
      6. Click OK to save changes.

How to create/edit scheduled task from the commands line, SSH with a system user account:

      1. Log in to Plesk
      2. Allow the customer to connect to the server via SSH on the page Plesk > Subscriptions > example.com > Web Hosting Access and allow Access to the server over SSH.
      3. Connect to the server over SSH with a system user account.
      4. Run the following command to open crontab editor:
      1. crontab -e

How to create/edit the scheduled task from the command line, SSH with "root" account:

    1. Connect to the server via SSH
    2. Run the following command to open crontab editor for a specific user:
      Replace johndoe with the desired username.
  1. crontab -e -u johnoe

  2. Type in the cron task parameters, using cron file syntax. For example:
    * * * * * /bin/echo "test" > /tmp/testfile

  • Email, SSL
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Backup of entire website

1. Log into Plesk2. Click on Domains3. Click on Manage Domain or Manage Hosting4. Click on...

How to Change E-Mail Account Password from panel?

Login into plesk panel using provided URL and its credentials Click on Mail tab Select...

How to change time zone in webmail ?

Login to Webmail  Click on "options" Click on "Personal Information" Select Your current...

How to Add A Directory in Plesk Panel?

Login into plesk panel using provided URL and its credentials Click on Website & Domains...

How to Change FTP Account Password in plesk panel?

Login into plesk panel using provided URL and its credentials Click on Website & Domains...