These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for cron does not run the php script on the new forum.
I need help urgently
I have crons scheduled like this * * * * * /usr/bin/php -f /home/mydomain/public_html/admin/cron/cron.phpif i run cron by clicking run now in webmin, it works
but if let to run as per schedule it doesn't work
this started since i tried to upgrade php 5.6 and then reversed it back to 5.3
help would be highly appreciated
I did
service crond restart and it got fixed at its own this time.
AB
Howdy,
Glad to hear that worked!
If you run into that in the future, you may also want to check the system logs to see if the process is running at the scheduled time, and erroring out, or whether it's not running at all.
-Eric
Hope I'm not breaking rules here by hijacking the thread but I seem to have a similar issue. The difference is that my cron won't even run if I "Run Now"
When I run the file directly from a web browser (https://[domain]/crm/vtigercron.php) I have joy but this is what I'm experiencing when trying to run it as a cron:
I'm using using the following command: php -f /home/[server name]/public_html/crm/vtigercron.php (I left ">/dev/null 2>&1" off so I can see the result)
I will set the schedule up once this is working but for now I keep getting the following result after a "Run Now" or "Save and Run Now":
Execute Cron Job
Output from command php -f /home/[server name]/public_html/crm/vtigercron.php ..
PHP Warning: include_once(vtlib/Vtiger/Utils.php): failed to open stream: No such file or directory in /home/[server name]/public_html/crm/vtlib/Vtiger/Cron.php on line 11
PHP Warning: include_once(): Failed opening 'vtlib/Vtiger/Utils.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/[server name]/public_html/crm/vtlib/Vtiger/Cron.php on line 11
PHP Warning: require_once(include/database/PearDatabase.php): failed to open stream: No such file or directory in /home/[server name]/public_html/crm/vtlib/Vtiger/Cron.php on line 12
PHP Fatal error: require_once(): Failed opening required 'include/database/PearDatabase.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/[server name]/public_html/crm/vtlib/Vtiger/Cron.php on line 12
Return to cron job
The cron has been set to run as root and is active.
Very confused after scouring through the forums and can't seem to find what I'm missing here. Can anyone help? :-)
Looks like your vtiger installation is incomplete. It is missing several files, which it needs to get everything working like PearDatabase.php, Utils.php etc.
So reinstall or add those files to the according folders in your system.
Best
Hi just_me,
Thank you so much for your reply. The files are definitely there and working because when running the php script from a web browser it works. I've done quite a bit of research on this and what I have determined is that there seems to be an issue with php recognizing the real path/directory name of the files within the vtiger script.
I'm now trying to see if there is a way to fix this instead of rewriting each of the vtiger scripts to include the real file path for the relevant files they refer to.
I'm new to all of this so on a major learning curve right now.
Have a look here: https://discussions.vtiger.com/index.php?p=/discussion/168016/how-to-fix... https://discussions.vtiger.com/index.php?p=/discussion/180463/vtogercron...
Best