Menu
Welcome, Guest
Username: Password: Remember me
Support for Advanced Open Workflow, Sales, Portal for SugarCRM Community Edition
  • Page:
  • 1
  • 2

TOPIC: Trouble Shooting Workflows

Trouble Shooting Workflows 1 month 4 days ago #89403

  • philemery
  • philemery's Avatar
  • Offline
  • Premium Member
  • Posts: 103
  • Thank you received: 6
  • Karma: 3
While looking at Admin/Schedulers I saw that the "Process Workflow Tasks" workflow shows that the "Last Successful Run" was 2017-07-04 11:15am

I've got the cron set as * * * * * cd /home/fccphil/public_html/crm; php -f cron.php > /dev/null 2>&1 in the cpanel cron tab.

I would imagine that the Last Succesful Run should be today?
The administrator has disabled public write access.

Trouble Shooting Workflows : More info: Cron not running in SuiteCRM directory 1 month 3 days ago #89492

  • philemery
  • philemery's Avatar
  • Offline
  • Premium Member
  • Posts: 103
  • Thank you received: 6
  • Karma: 3
So on the server, there is a bunch of WordPress installs and their cron jobs seem to be running. Going over the server with Support they can't see anything wrong and that cron seems to be ok.

It looks like the cron jobs aren't running from the directory where suitecrm is , but other places it's ok.

I've checked the php.ini for that directory and made sure that "allow_url_fopen" and "allow_url_include" are enabled (some googling suggested this). But still no go.

Any idea why cron jobs wouldn't be running on only this directory?
The administrator has disabled public write access.

Trouble Shooting Workflows : More info: Cron not running in SuiteCRM directory 1 month 3 days ago #89497

  • philemery
  • philemery's Avatar
  • Offline
  • Premium Member
  • Posts: 103
  • Thank you received: 6
  • Karma: 3
also the cron job is listed in the /var/cron log

Sep 15 09:00:01 ### CROND[20890]: (fccphil) CMD (cd /home/###/public_html/crm; php -f cron.php > /dev/null 2>&1)

Does that mean it ran?
The administrator has disabled public write access.

Trouble Shooting Workflows : More info: Cron not running in SuiteCRM directory 1 month 3 days ago #89500

  • MadMart
  • MadMart's Avatar
  • Offline
  • Senior Member
  • Posts: 52
  • Thank you received: 18
  • Karma: 2
I see you are using the default php handler in your PATH variable for cron
is this the same handler you are using for your crm instance?

some OS's like CentOS provide very old handlers like 5.4 so control panels like plesk allow to install separate ones along side it.

what I'm getting at is the cron task may be using a php handler that does not work with SuiteCRM
Last Edit: 1 month 3 days ago by MadMart.
The administrator has disabled public write access.

Trouble Shooting Workflows : More info: Cron not running in SuiteCRM directory 1 month 3 days ago #89501

  • philemery
  • philemery's Avatar
  • Offline
  • Premium Member
  • Posts: 103
  • Thank you received: 6
  • Karma: 3
We'll suitecrm is running on php 7.3 and the os is CentOS 6.10 /cPanel/WHM

Which handler should I use?

It is the same handler in the crm instance
The administrator has disabled public write access.

Trouble Shooting Workflows : More info: Cron not running in SuiteCRM directory 1 month 3 days ago #89503

  • MadMart
  • MadMart's Avatar
  • Offline
  • Senior Member
  • Posts: 52
  • Thank you received: 18
  • Karma: 2
starting from 7.11.5 SuiteCRM supports PHP 7.3
otherwise the minimum version has to be 5.6
so we can rule that out.
unsure if you have the same functionality in cpanel but in plesk you have an option to send anything printed to stderr during the cron task in an email

you'll have to drop the > /dev/null 2>&1 part on the end as this discards anything sent to stderr and stdout
Last Edit: 1 month 3 days ago by MadMart. Reason: adding in extra information
The administrator has disabled public write access.

Trouble Shooting Workflows : More info: Cron not running in SuiteCRM directory 1 month 3 days ago #89504

  • MadMart
  • MadMart's Avatar
  • Offline
  • Senior Member
  • Posts: 52
  • Thank you received: 18
  • Karma: 2
replace
> /dev/null 2>&1
with something like
2> path_to_some_log_file.log
The administrator has disabled public write access.

Trouble Shooting Workflows : More info: Cron not running in SuiteCRM directory 1 month 3 days ago #89512

  • philemery
  • philemery's Avatar
  • Offline
  • Premium Member
  • Posts: 103
  • Thank you received: 6
  • Karma: 3
thanks so the job is now

cd /home/fccphil/public_html/crm; php -f cron.php > /dev/null 2> /var/log/crm.log

I created the crm.log file within the var/log directory?

or should it replace the "/dev/null" ?
The administrator has disabled public write access.

Trouble Shooting Workflows : More info: Cron not running in SuiteCRM directory 1 month 3 days ago #89529

  • philemery
  • philemery's Avatar
  • Offline
  • Premium Member
  • Posts: 103
  • Thank you received: 6
  • Karma: 3
Looks like none of the schedulers have the same last successful run date.
The administrator has disabled public write access.

Trouble Shooting Workflows 1 month 3 days ago #89530

  • pgr
  • pgr's Avatar
  • Offline
  • Administrator
  • Posts: 11144
  • Thank you received: 1669
  • Karma: 380
Do you have at least one job with "last ran successfully" at a recent time?

That would show that your cron set up is running fine; which basically means that Linux is doing its job of calling cron.php.

But then cron.php starts doing a bunch of jobs, and some of them might fail: so your problem with the Workflow job would be something else, and a matter for debugging or going through the logs (both)

My SuiteCRM In-depth blog.
Thank you for always stating your SuiteCRM version, checking your logs, reading the Docs, and searching before you ask!
The administrator has disabled public write access.

Trouble Shooting Workflows 1 month 3 days ago #89535

  • philemery
  • philemery's Avatar
  • Offline
  • Premium Member
  • Posts: 103
  • Thank you received: 6
  • Karma: 3
Nope they all have the same last run date 2017-07
The administrator has disabled public write access.

Trouble Shooting Workflows 1 month 3 days ago #89542

  • pgr
  • pgr's Avatar
  • Offline
  • Administrator
  • Posts: 11144
  • Thank you received: 1669
  • Karma: 380
Ok. Try to find the exact location of the php executable. So you can add that to the cron command.
php -i | grep "'_'"

Suppose that gives "/usr/bin/php"

Then your cron command would become
cd /home/fccphil/public_html/crm; /usr/bin/php/php -f cron.php 2>/dev/null

or if you want the logging to the file, while you're debugging this:
cd /home/fccphil/public_html/crm; /usr/bin/php/php -f cron.php  2>/var/log/crm.log

My SuiteCRM In-depth blog.
Thank you for always stating your SuiteCRM version, checking your logs, reading the Docs, and searching before you ask!
The administrator has disabled public write access.

Trouble Shooting Workflows 1 month 3 days ago #89543

  • philemery
  • philemery's Avatar
  • Offline
  • Premium Member
  • Posts: 103
  • Thank you received: 6
  • Karma: 3
If I do

cd /home/fccphil/public_html/crm; /usr/bin/php/php -f cron.php 2>/var/log/crm.log

I get a "permission denied" error
The administrator has disabled public write access.

Trouble Shooting Workflows 1 month 2 days ago #89544

  • philemery
  • philemery's Avatar
  • Offline
  • Premium Member
  • Posts: 103
  • Thank you received: 6
  • Karma: 3
Moved back to

cd /home/fccphil/public_html/crm; /usr/bin/php -f cron.php /dev/null 2>&1

I get an email with "cron.php is CLI only."
The administrator has disabled public write access.

Trouble Shooting Workflows : SOLVED 1 month 2 days ago #89553

  • philemery
  • philemery's Avatar
  • Offline
  • Premium Member
  • Posts: 103
  • Thank you received: 6
  • Karma: 3
What worked on my system is
cd /home/fccphil/public_html/crm; /usr/local/bin/php -f cron.php  2>/var/log/crm.log

All the workflows are now working and showing recent date for last successful run.


Thanks, everyone!
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 0.086 seconds
Powered by Kunena Forum