Article ID: 115292, created on Dec 12, 2012, last review on Jun 17, 2016

  • Applies to:
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Windows
  • Plesk 11.5 for Windows
  • Plesk 10.4 for Windows


How do I call my PHP/Perl/ASP.NET/other script from a scheduled task?


Run script with appropriate program

If the script can be executed with an interpreter (e.g., PHP or Perl) and does not require parameters defined in an HTTP request, create a new scheduled task that calls the script interpreter with the path to the script as an option:

/usr/bin/perl /var/www/vhosts/domain.test/cgi-bin/crontasks/

On Windows:

Path to executable file: "C:\Program Files (x86)\Parallels\Plesk\Additional\Perl\bin\perl.exe"     Arguments: "C:\Inetpub\vhosts\domain.test\cgi-bin\crontasks\"

Make HTTP request to call the script

Another way to call the script is to create a task that will perform an HTTP request to the required script:

/usr/bin/wget -qq -O /dev/null http://domain.test/script.php


/usr/bin/curl -sL http://domain.test/script.php >/dev/null

On Windows, it is possible to make an HTTP request through PowerShell:

Path to executable file: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
    Arguments: -c "(new-object'http://domain.test/script.aspx')"

Important notes

  1. Paths to utilities should be absolute, i.e., /usr/bin/wget instead of just wget.
  2. If a domain is set up to allow shell access via a chrooted shell (on Linux), then the commands defined in cronjobs will be looked up inside the chrooted environment set up in the virtual host directory. Such an environment contains a minimal set of utilities and language interpreters (Perl/PHP), but network utilities (curl/wget) are not included. As such, the command will fail to run. To avoid this, you may set up the server to execute scheduled tasks for all users in the global server scope using the instructions provided in this KB article: #115889

See also

For more information on how to schedule tasks, read the chapter Scheduling Tasks in the Plesk Administrator's Guide.

Search Words

plesk aspx cronjob


Tasks in scheduled tasks not executing

cron job

schedule task

56797cefb1efc9130f7c48a7d1db0f0c a914db3fdc7a53ddcfd1b2db8f5a1b9c 29d1e90fd304f01e6420fbe60f66f838 0a53c5a9ca65a74d37ef5c5eaeb55d7f bd7fc88cf1b01f097749ae6f87272128 85a92ca67f2200d36506862eaa6ed6b8 c796c01d6951fa24ed54c7f1111667c6 ff5a00b8ead2e480367b019417a04207 46a8e394d6fa13134808921036a34da8 01bc4c8cf5b7f01f815a7ada004154a2 ed7be2b984f9c27de1d2dc349dc19c6d a766cea0c28e23e978fa78ef81918ab8

Email subscription for changes to this article
Save as PDF