I'm trying to setup a cron task in Plesk to run a short script every 5 minutes, I've just moved from a managed hosting account to a full access Plesk VPS, and I'm a little lost on a couple of things, this one in particular, when I go to Server > Scheduled Tasks
I get a list of 'system users' as below, but I'm not sure under which user to make the cron task, any ideas?
The cron script path is below if that's relevant as to which user to choose -
/var/www/vhosts/mysite.com/httpdocs/scripts/index.php
What does * mean in Cron? The asterisk * is used as a wildcard in Cron. * sets the execution of a task to any minute, hour, day, weekday, or month.
If you are going to create subscription-level task, than you can create cron/windows scheduler task in:
"Subscriptions" > your subscription > "Websites & domains" > click on "Show advanced operations" > "Scheduled Tasks" > there will be only one name of FTP user of your subscription.
Note: Pay attention to interface changes for Plesk 11.5 and Plesk 12+ - there is no need to open "Show advanced operations".
The latest Plesk 12.5 provide a lot of options to cover most of the task cases:
Plesk 12.5
Other Plesk versions support only "Run a command" option:
Plesk 12.0
Plesk 11.5
If you need just answer, in "Server" -> "Scheduled Tasks" you can choose:
FTP user of your subscription mysite.com
your can choose root
, but it's not recommended for security reasons.
For Plesk version below 12.5 to schedule execution of PHP script on Windows there is two ways:
Direct call of php
binary with your script as argument.
Path to executable file: C:\Program Files (x86)\Parallels\Parallels Panel\Additional\PleskPHP55\php.exe
Arguments: path to you script like C:\inetpub\vhosts\domain.tld\httpdocs\script.php
Note: Pay attention to interpretation path, ...Additional\PleskPHP55\php.exe
it path for PHP 5.5, you can change PleskPHP55 to PleskPHP5, PleskPHP53 or PleskPHP54 to use another PHP version.
Call script via request to your site:
Path to executable file: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Arguments: -c "(new-object system.net.webclient).downloadstring('http://domain.test/script.aspx')"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With