Scheduled workflow does not seem to be working

I have created my first workflow in suiteCRM. Te idea is simple, I created a “REQUEST” module (SOLICITUDES) linked to the CASES module in a 1:n relationship.

The idea is that the schedule would search for all the REQUEST open which are related to closed cases and close them automatically.
The workflow is configured in the following way:1. Workflow module: REQUEST
[li] Run: Always
[li] Run on: All records
[li]Repeated runs: checked
CONDITION:
[li] REQUEST status must equal “requested”
[li] CASE sttus must equal “closed”
ACTION
[li] Select Action: Modify Record
[li] Record Type: REQUEST
[li] Set variable status to “closed” and variable AutoCLose to todays datetime.

The issue is that if I go into one of the requests and make an edit and save, the workflow is executed without an issue. On the other hand the schedule does not seem to be executing the workflow. I can see the scheduler executing every minute but the workflow does not seem to be matching any of my request.

What do you see in your logs? Especially any errors occurring every minute.

In suitecrm.log I get the following:

Wed May 29 17:03:05 2019 [5339][1][FATAL] Job dc41fb11-0231-048e-3527-5cee9f20aa67 (Procesar Tareas de Workflow) failed in CRON run
Wed May 29 17:04:04 2019 [5365][1][FATAL] Job 35c58046-c796-c8f9-ebd7-5cee9fca0322 (Procesar Tareas de Workflow) failed in CRON run
Wed May 29 17:05:07 2019 [5388][1][FATAL] Job 1a64ebf5-b782-9759-860c-5cee9feb3421 (Procesar Tareas de Workflow) failed in CRON run
Wed May 29 17:06:04 2019 [5482][1][FATAL] Job e85b8c24-797f-b773-6c98-5cee9f5e210a (Procesar Tareas de Workflow) failed in CRON run
Wed May 29 17:07:04 2019 [5525][1][FATAL] Job 721481c5-f763-ec99-139e-5ceea07a7782 (Procesar Tareas de Workflow) failed in CRON run
Wed May 29 17:08:05 2019 [5545][1][FATAL] Job d89416b0-8c0a-7c41-3ab1-5ceea0238cff (Procesar Tareas de Workflow) failed in CRON run
Wed May 29 17:08:16 2019 [5555][1][FATAL] Job runs too frequently, throttled to protect the system.
Wed May 29 17:09:04 2019 [5570][1][FATAL] Job 9a16de04-021a-86e0-e831-5ceea01ab473 (Procesar Tareas de Workflow) failed in CRON run
Wed May 29 17:10:09 2019 [5654][1][FATAL] Job d339e1cb-5dbf-2482-e2ff-5ceea06df4a7 (Procesar Tareas de Workflow) failed in CRON run
Wed May 29 17:11:07 2019 [5681][1][FATAL] Job b8c63e45-90af-b71e-64ad-5ceea11af98c (Procesar Tareas de Workflow) failed in CRON run

When I run the cron.php script manuallyu all I get is

PHP Warning: “continue” targeting switch is equivalent to “break”. Did you mean to use “continue 2”? in /var/www/html/finquesCRM/data/SugarBean.php on line 2551

Warning: “continue” targeting switch is equivalent to “break”. Did you mean to use “continue 2”? in /var/www/html/finquesCRM/data/SugarBean.php on line 2551
PHP Warning: “continue” targeting switch is equivalent to “break”. Did you mean to use “continue 2”? in /var/www/html/finquesCRM/data/SugarBean.php on line 2565

Warning: “continue” targeting switch is equivalent to “break”. Did you mean to use “continue 2”? in /var/www/html/finquesCRM/data/SugarBean.php on line 2565

Which is similat to what I see in the apache error.log as php errors.

I do not find any PHP_error.log files… I have checked my php.ini configuration and tried to activate it but it does not seem to be generating any logs.
In the apache error.log i only see the following:

I have managed to get the followign error when executing the cron.php manually :

PHP Fatal error: Uncaught Error: Class ‘SOPRO_Solicitud’ not found in /var/www/html/finquesCRM/modules/AOW_WorkFlow/AOW_WorkFlow.php:238
Stack trace:
#0 /var/www/html/finquesCRM/modules/AOW_WorkFlow/AOW_WorkFlow.php(193): AOW_WorkFlow->get_flow_beans()
#1 /var/www/html/finquesCRM/modules/AOW_WorkFlow/AOW_WorkFlow.php(182): AOW_WorkFlow->run_flow()
#2 /var/www/html/finquesCRM/modules/Schedulers/_AddJobsHere.php(811): AOW_WorkFlow->run_flows()
#3 /var/www/html/finquesCRM/modules/SchedulersJobs/SchedulersJob.php(540): processAOW_Workflow(Object(SchedulersJob))
#4 /var/www/html/finquesCRM/include/SugarQueue/SugarCronJobs.php(191): SchedulersJob->runJob()
#5 /var/www/html/finquesCRM/include/SugarQueue/SugarCronJobs.php(231): SugarCronJobs->executeJob(Object(SchedulersJob))
#6 /var/www/html/finquesCRM/cron.php(98): SugarCronJobs->runCycle()
#7 {main}

I have rebuilt the schedulers and for a brief instant of time the error

that appeared when running cron.php manually stopped appearing, but then started appearing again

Just to clarify about the error:
PHP Fatal error: Uncaught Error: Class ‘SOPRO_Solicitud’ not found in /var/www/html/finquesCRM/modules/AOW_WorkFlow/AOW_WorkFlow.php:238

Solicitud is the custom module I created… It seems it is having problems accessing the custom module from the workflow launched from the scheduler

Try a few rebuilds from Admin / Repairs. Try Relationships, QR & R, etc, whatever looks relevant.

I fixed the problem …
It ended up being a permissions issue.
There was a cahce directory that had wrong permissions

Make sure your cron jobs are not running as root, otherwise your permissions will keep getting sabotaged…