When configuring Scheduled Tasks on a Plesk hosting environment you will want to use the following executable and argument paths when configuring the task.  If you are doing on a shared hosting environment you may not be able to parse .exe or .vb files. If you have this file type you should add the script from the .exe or .vb file to a .php or .aspx file extension and call it from the task scheduler.

 

Scheduled Tasks

 

The executable and argument paths differ for ASPX and PHP files.

ASPX Files

Type Path
Executable C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Argument -c “(new-object system.net.webclient).downloadstring(‘http://[domain.tld]\[path]\[file_name]‘)”

PHP Files

Type Path
Executable C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP54\php-cgi.exe
Argument G:\PleskVhosts\[domain.tld]\[path]\[file_name]

The examples we provide use the following variables:

Variable Definition
[domain.tld] The hosting account’s primary domain
[path] The path to the file
[filename] The name of the file you want to call

 

Comments Off on Scheduler Tasks – Plesk