(dv) 4.0:Resolving cron errors
- This page was last modified on June 2, 2011, at 08:27.
From (mt) Community Wiki
Contents |
Overview
This article covers resolving errors with crons on the (dv) Dedicated-Virtual 4.0. Specifically, errors relating to binaries that cannot be found.
If you're looking for instructions on how to set up crons, please see the KnowledgeBase.
Diagnosing
So you've set up a cron that calls one of your servers binaries. For examples sake, let's say you have a domain, domain.com. You're trying to call a PHP file at domain.com/includes/cronjob.php. You could run a command like:
/usr/bin/php /var/www/vhosts/domain.com/httpdocs/includes/cronjob.php
However, by default the above syntax will give you an error:
php: command not found
This is due to the user you're running the cron as being in a chrooted environment.
Resolving
To resolve this error:
- Log into Plesk
- Click Subscriptions
- Click domain.com
- Click Control Panel
- Click Websites and Domains
- Click Web Hosting Settings
- Under Access to the server over SSH select /bin/bash
- Click OK to save your changes
That's it! Now your cron jobs can use standard server binaries.