How to schedule a PHP script in Plesk for Windows using cronjob/crontab

Nowadays it’s dead easy to schedule a PHP script as a cronjob/crontab in Plesk Onyx for Windows. However, in the previous versions, Plesk did not supply a sample syntax for scheduled tasks. Most examples found on the interwebs assume that you’re running Plesk on Linux, but if you are like me and run Plesk on Windows, that syntax is just plain wrong.

This small ‘note to self post’ shows how to correctly schedule a PHP script in Plesk for Windows for those of you who are still running an older version of Plesk :)

Step 1. Open Plesk and search for Scheduled Tasks

Step 2. Create a new cronjob/crontab as shown above. Adjust the parameters to your liking. In this example, I’ve scheduled the particular .php script to run every 5 minutes of each day of the week.

Step 3. You’re done! In the end, your finished cronjob/crontab should look like in the image above. If desired, you can also run it on demand by clicking Run Now.

In:

3 responses to “How to schedule a PHP script in Plesk for Windows using cronjob/crontab”

  1. Kanupriya Avatar
    Kanupriya

    its not working, please help me to run cronjob for auto send email

  2. Kanupriya Avatar
    Kanupriya

    I want to know the path for MVC (codeigniter) framework.
    As I tried for : httpdocs/admin/cron_home.php
    Working fine
    If I pass, httpdocs/application/controllers/Cron.php
    get an error: No direct script access allowed
    Please guide me for “codeigniter framework” how to run PHP script to send auto email

    1. Freek Avatar
      Freek

      Sorry, I have no experience with CodeIgniter so I can’t help you :(

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.