Hi,
Workflow itself works quite well, but none of the timebased conditions are working
Example (assuming workflow module = contact / execute always) :
Contacts modification date less or equal Date Now - 5 Minutes
Action : send mail etc…
Don’t send anything when I modify any records…
I’ve literally tried every possible combination of conditions, it never works. The best I can manage is to have a mail send at the exact moment I Mofidy or create a record.
Mail reminder functionnality is essential, can you give me any help on that ?
Thx in advance.
Hello,
Yes it is, because workflows are working & all scheduled tasks are running effectively, but as soon as it involves a time based condition, it doesn’t…
It’s triggered by an external online cron (https://cron-job.org/) & everythng seems right with it…
Scheduler jobs normally run through the CLI version of PHP, not through the Web server, so they have a different php.ini file.
Most people don’t know about this, and forget to set the timezone for the CLI.
Check Admin–>Schedulers, if the times you see there don’t match your timezone this is the problem you’re getting.
Thanks for your answer.
Actually, I had to comment this line in cron.php for the cron job to work on this online solution :
//$sapi_type = php_sapi_name();
//if (substr($sapi_type, 0, 3) != 'cli') {
// sugar_die("cron.php is CLI only.");
//}
My timezones seems to fit, as you can see in the screenshot.
Any other leads ?
Sorry, when I wrote my answer I hadn’t read your second post explaining how your cron jobs were launched…
I don’t have many additional ideas, then… I believe @amariussi once had a tip about a very similar issue that worked, but I don’t really remember what it was…
Here is my setup, in more detail, in case it can help to find a solution :
- The site is hosted on one specific online host
- The sql on another
- The cron job is launched from cron-job.org, as my host doesn’t allow cron jobs under 1h (OVH)
- It work with a modified cron.php, as described above, in order to make it work with web hosted cron jobs
- scheduling is working well, and my timezones are correctly set
Maybe it’s my workflow setup ?
[Solved]
What was not correctly set was the “Run nightly mass email” schedule : for not overloading my mail host, I’ve set it to be triggered every 1/2 hours.
To check if my workflow was working, the final action was to send myself a mail, 2 minutes after the modification.
Since it is the “Run nightly mass email” job which runs the sending of the mail, obviously I couldn’t receive a mail 2mn after my modification, since the related scheduled job was half-hour set…
Hope it could help if someone have the same problem, since it’s absolutely not obvious that this 2 process can be related !
Regards.