Plesk

Set up scheduled tasks (cron jobs) in Plesk

Create scheduled tasks in Plesk to run a command, fetch a URL or run a PHP script on a schedule, with notifications, logging and common cron mistakes explained.

IntermediatePlesk3 min read

Scheduled tasks are Plesk's interface to cron. They run a command, a PHP script or a URL at fixed times, which is how WordPress, WHMCS, Laravel and many other applications process queues, send emails and clean up data. This guide shows how to create a reliable task and how to check that it actually runs.

Before you start

  • Your subscription needs the Scheduling tasks permission. Customers without it will not see the menu.
  • Know the full path to your script. In Plesk the site's files are under /var/www/vhosts/example.com/httpdocs/, and tasks run as the subscription's system user.

Create a scheduled task

  1. Log in to Plesk and go to Websites & Domains.
  2. Click Scheduled Tasks (in the left menu under Tools & Settings for administrators, or in the domain's dashboard for customers).
  3. Click Add Task.
  4. Choose the Task type:
    • Run a command – any shell command allowed for the user.
    • Fetch a URL – Plesk requests a web address, useful for web-based cron endpoints.
    • Run a PHP script – pick the script path, add arguments and choose the PHP version.
  5. Set Run to a preset (Hourly, Daily, Weekly, Monthly, Yearly) or Cron style for a custom expression.
  6. Add a Description so you know what the task does later.
  7. Under Notify, choose Errors only to receive an email when the task fails.
  8. Click Run Now to test, then OK to save.

Cron-style schedules

The cron format has five fields: minute, hour, day of month, month, day of week.

ExpressionMeaning
*/5 * * * *Every 5 minutes
0 * * * *At the start of every hour
30 2 * * *Daily at 02:30 server time
0 3 * * 0Every Sunday at 03:00

Times use the server's time zone, shown in Tools & Settings → System Time for administrators.

Common examples

  • WordPress real cron: add define('DISABLE_WP_CRON', true); to wp-config.php, then create a Run a PHP script task for httpdocs/wp-cron.php every 15 minutes.
  • WHMCS: a Run a PHP script task for crons/cron.php every 5 minutes.
  • Laravel scheduler: a command task cd httpdocs && php artisan schedule:run every minute.

Check that it runs

  • Use Run Now and read the output shown by Plesk.
  • Redirect output to a log file in your command, for example >> ~/logs/cron.log 2>&1, and check it with the File Manager.
  • Look at the application's own status page (WHMCS shows the last cron run in System Health).

Troubleshooting

  • Command not found: use full paths, for example /opt/plesk/php/8.3/bin/php instead of php, or use the PHP script task type.
  • Permission denied: the script must be readable by the subscription user and not owned by root.
  • Task works with Run Now but not on schedule: the schedule may be in a different time zone, or the command relies on a working directory. Add cd to the path first.
  • Too many emails: switch Notify to Errors only or silence output with >/dev/null 2>&1.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.