Plesk scheduled Task from cs-cart

67 views Asked by At

I have create many cronjobs in cPanel but I can not in Plesk. The command I want is like this:

/usr/local/bin/ea-php74 /home/user_domain/public_html/admin.php -p --dispatch=controller_name.mode_name

So, I am trying to create a schedule task in Plesk inviroment, like the above. Thus, I go to Websites & Ddomains > Scheduled Tasks and create a "Run a command" like this:

/var/www/vhosts/domain/httpdocs/admin.php -p --dispatch=controller_name.mode_name

But I am getting an error path not found (does not exist.. something like that). I know when you are working in cPanel the domain name becomes the username of the account. In Plesk what exactly did not find? what is the path before httpdocs?

Guess I am missing some parts. Any help would be appreciated

1

There are 1 answers

0
Thomas On

In Plesk you have three types of script execution. Choose "PHP" and only enter the PHP script and path into the filename field. Your parameters go into the "parameters" field. The script cannot successfully run if you add the parameters into the filename field.

The absolute path is /var/www/vhosts/// For example it could be /var/www/vhosts/domain/httpdocs/admin.php if your subscription domain name is "domain". So it looks as if your path is correct. If you still get a "not found" error, check that again. If your document root directory is not named "httpdocs" (frequently the case if your script is not in your subscription domain, but an add-on domain the subscription), replace httpdocs with the correct document root directory.