Home › Cron Jobs in Plesk

How to Add a Cron Job in Plesk

Plesk calls them "Scheduled Tasks" rather than cron jobs. Under the hood they are the same thing. This guide covers setup, the chrooted shell limitation and how to run PHP scripts and fetch URLs.

Where to Find Scheduled Tasks in Plesk

In Plesk Obsidian (current version), scheduled tasks are in two places depending on your role:

Access levelPath
Customer / subscription levelWebsites & Domains › Scheduled Tasks
Server administratorTools & Settings › Scheduled Tasks (Cron Jobs)

Official Plesk documentation: Scheduling Tasks - Plesk Obsidian docs.

Add a Scheduled Task - Step by Step

1. Navigate to Scheduled Tasks

Go to Websites & Domains, select the domain you want to schedule a task for, and click Scheduled Tasks. Then click Add Task.

2. Choose the task type

Plesk offers three types - pick the right one for your use case:

  • Run a command - shell command or script
  • Fetch a URL - HTTP GET to a URL (no curl needed)
  • Run a PHP script - specify the PHP file path directly

3. Set the schedule

Choose between predefined options (Daily, Weekly...) or switch to Cron style for custom expressions using standard cron syntax. The time is in the server timezone by default. To change it per-task, go to Websites & Domains › Scheduled Tasks › Settings.

4. Configure notifications

You can set an email address to receive the task output on completion. Same advice as cPanel: suppress output for frequent jobs to avoid inbox flooding.

The Chrooted Shell - Plesk's Main Gotcha

Commands that work in SSH may fail in Plesk scheduled tasks

On Plesk for Linux, scheduled tasks of type "Run a command" run in a chrooted environment by default. This means the filesystem root is changed to the subscription's home directory - commands outside that scope are not accessible. If you get "file not found" or "command not found" errors, this is almost certainly the cause.

Solutions:

  • Use Run a PHP script or Fetch a URL instead of "Run a command" - these are not affected by the chroot.
  • Ask your hosting provider to change the shell setting for your subscription (server admin access required).
  • Use paths relative to your home directory instead of absolute paths.

Full details in the official Plesk docs: Scheduled tasks shell setting - Plesk Obsidian.

Common Plesk Scheduled Task Examples

Task typeScheduleValue
Run PHP script 0 2 * * * /var/www/vhosts/domain.com/httpdocs/backup.php
Fetch URL */15 * * * * https://domain.com/cron.php
Run command 0 0 * * 0 /var/www/vhosts/domain.com/httpdocs/cleanup.sh
WordPress WP-Cron */5 * * * * Fetch URL: https://domain.com/wp-cron.php?doing_wp_cron
Laravel scheduler * * * * * php /var/www/vhosts/domain.com/httpdocs/artisan schedule:run

Plesk vs cPanel: Key Differences for Cron Jobs

PleskcPanel
Term usedScheduled TasksCron Jobs
Task typesCommand / PHP script / URL fetchCommand only
Chrooted environmentYes (by default for "Run a command")No
Custom timezone per taskYesNo (server timezone only)
PHP file path/var/www/vhosts/domain/httpdocs//home/username/public_html/

Build your cron expression for Plesk

Switch to "Cron style" in Plesk and paste the expression directly. Standard 5-field Linux syntax.