Cronjob exasperation

Hi, I have poured over all conjob related posts and searched via google as much as I can but I just cannot get my cronjob to execute correctly.

I manage cronjobs via my cpanel and then a cron job UI. Fastcomet is my provider if that matters.

First I tried

path to my crm/public_html/MMcrm; php -f cron.php

Result - No input file specified.

Then I added -cli to the cron based off a suggestion found on this forum so

path to my crm/public_html/MMcrm; php-cli -f cron.php

Result - Could not open input file: cron.php

Further searching said to be sure I am logged in (to where? assume C panel) as the correct user for the cron. The user in the path of the cron is the same as my c panel login so assume that is ok.

Then I checked out permissions on the cron.php file - they were 6 4 4
I changed them to 7 7 7 ie full permission.

Same result- Could not open input file: cron.php

I am now at my wits ends. I have set up cronjobs on the same domain using the same method for other softwares with out issue.

I am no coder but if you give me code and tell me the file to go edit etc I am up for that.

If you need me to test anything, instructions for dummies would be appreciated.

Hoping some kind soul will help me sort this out.

PS the anomaly is a workflow did execute successfully once off, but for the life I cannot figure out how I did it as I have only used the crons listed above which all seem to fail. And I cannot get any workflows to run again.

instead of:

path to my crm/public_html/MMcrm; php -f cron.php

try:

* * * * * cd /path-to-my crm/public_html/MMcrm; php -f cron.php

(note the “* * * * * cd /” before the path (which is an absolute path)

In case that doesn’t work you may add the path to php:

* * * * * cd /path-to-my crm/public_html/MMcrm; /path-to-php/php -f cron.php

for example, if it is /usr/bin:

* * * * * cd /path-to-my crm/public_html/MMcrm; /usr/bin/php -f cron.php

furthermore: it would be wise that you redirect the output to a null device by appending the following at the end of your line: > /dev/null 2>&1

Thanks for your time.

I am trying your suggestions but I think the errors are coming in with paths.

Is there a way to share the exact path with you without sharing the path with whole world?

I am sure if you saw my path you would be able to give me the correct cron.

/path to my crm/ involves quite a few /…/…/ if I am making sense?

After changing the cron to every variation of your suggestions this one
cd /home/user/public_html/MMcrm; /usr/local/cpanel/3rdparty/bin/php -f cron.php

User is replaced with c panel user name

I now get this response, and have no idea what it means

PHP Strict Standards: Declaration of SugarEmailAddress::save() should be compatible with SugarBean::save($check_notify = false) in /home/user/public_html/MMcrm/include/SugarEmailAddress/SugarEmailAddress.php on line 1162

Have a look at this thread of the forum:
https://suitecrm.com/forum/advanced-opensales-workflow-portal-support/14029-workflow-not-working-suitecrm-installed-on-centos-6-3-64bit

Thanks I have read it but will study it again,

But does that result mean my cronjob is executing correctly?

I know have a second issue?

Workflows are not running .

To set up the cron job correctly go to Admin->System section->Scheduler then follow the instructions found in the bottom

To see if workflows are running: go to Admin->System section->Scheduler->Process Workflow Tasks->Job Log
If cron jobs are running you will see a list of all the times the cron job has run

If it doesn’t please post pictures of those screens as well as the cron job you have set

Thanks again,

https://screencast.com/t/oO2K5Amyu - screen grab of the scheduler job log - look like the cron is running?

The cron I was running during the time of this job log was - *****cd /home/user/public_html/MMcrm; /usr/local/cpanel/3rdparty/bin/php -f cron.php
user being replaced with the user name for the server

AWESOMe all is working

The cron syntax of *****cd /home/user/public_html/MMcrm; /usr/local/cpanel/3rdparty/bin/php -f cron.php

did the job, where user is replaced with the user name for my cpanel (same as the user name given in the con job under scheduler although in my case the final cron looked very different as you can see.

Thanks Amaruissi

Well done!