How to Create a Cron Job in Plesk

Cron jobs (Scheduled Tasks) allow you to run scripts automatically at specified times from your hosting environment.


Step 1: Log in to Plesk

Visit your Plesk panel:

https://your-server-ip:8443

Log in with your credentials.


Step 2: Go to Scheduled Tasks

  • In the left sidebar, click Tools & Settings (for admin) or Websites & Domains (for individual domains)

  • Then click Scheduled Tasks (sometimes labeled “Cron Jobs”)

If you're using a domain-level user, it may be under the domain dashboard > Scheduled Tasks.


Step 3: Click "Add Task"

Click the Add Task button to create a new cron job.


Step 4: Configure the Task

Fill in the following fields:

  • Task type: Choose one of:

    • Run a command

    • Fetch a URL

    • Run a PHP script

  • Command/Script: Enter the full command or URL
    Example:

    /usr/bin/php /var/www/vhosts/yourdomain.com/httpdocs/cron.php
    
  • Run: Set the schedule using minutes, hours, days, etc.
    Example:

    Every day at midnight = 0 0 * * *
    

You can also use the drop-down presets if you're not familiar with cron syntax.


Step 5: Save the Task

Click OK or Apply.

Your cron job is now scheduled and will run automatically based on the time settings.


Optional: Set Notifications

You can set your email address to receive the output of the cron job, especially useful for debugging.


 

Was this answer helpful? 0 Users Found This Useful (0 Votes)