The following are some helpful notes on scheduling a vbscript or PHP script to run via the Plesk scheduler function... they may vary slightly depending on your version of Plesk, be sure to note where command/paths vary by which server you are hosted on. You can identify which server your domain is hosted on by the URL for your control panel (i.e., if your control panel URL is https://web18.3essentials.com, then you are hosted on WEB18).
Please note you can only SCHEDULE a process that is EXECUTABLE, i.e. a batch file, or as demonstrated here a vbscript or a php script... which actually isn't executable, as you're actually scheduling the execution of the script engine, and passing it the arguement of your script's location, the script engine is the executable, and it processes the script you tell it to. This works fine as shown here for executing a vbscript or php script. But you can't execute an HTML, ASP or ASP.net (.ASPX file), because those aren't exectuable and there's no "script engine" for you to use to process them as there is with a vbscript or php script.
VBSCRIPT
- Complete the corresponding fields as noted in the following example:
- Path to executable file: C:\WINDOWS\system32\cscript.exe
- Arguments: /nologo e:\inetpub\vhosts\domain.com\httpdocs\somfile.vbs
- Where:
- domain.com is your domain name
- httpdocs, or whichever folder you've placed this file in.
- somefile.vbs is the name of your vbscript file.
- Exceptions:
PHP script
- Complete the corresponding fields as noted in the following example:
- Path to executable file:
- On Web10, web12, web14, web16
- PHP4 only: "E:\Program Files\SWsoft\Plesk\Additional\Php\php.exe"
- On Web18:
- For PHP4: "E:\Program Files\SWsoft\Plesk\Additional\Php\php.exe"
- For PHP5*: "E:\Program Files\SWsoft\Plesk\Additional\PleskPHP5\php-win.exe"
- On Web20:
- For PHP4: "F:\Program Files\SWsoft\Plesk\Additional\Php\php.exe"
- For PHP5*: "F:\Program Files\SWsoft\Plesk\Additional\PleskPHP5\php-win.exe"
- On Web22 and up:
- For PHP4: "E:\Program Files\Parallels\Plesk\Additional\Php\php.exe"
- For PHP5*: "E:\Program Files\Parallels\Plesk\Additional\PleskPHP5\php-win.exe"
- Arguments: e:\inetpub\vhosts\domain.com\httpdocs\somfile.php
- Where:
- domain.com is your domain name
- httpdocs, or whichever folder you've placed this file in.
- somefile.php is the name of your vbscript file.
* With PHP5, php introduced a specific php executable for command line for Windows, php-win.exe. Please refer to php.net's documentation on using the php-win.exe which is the command line exe for php, which is a slightly different environment for php exeuction.
If you're using the Scheduler Notification function, please see this KB article: http://knowledge.3essentials.com/web-hosting/article/645/Scheduled-Task-doesnt-send-notification.html
|