I am trying to create a new scheduler action In the Scheduler Module in order to automatically run geocode count CRON. I am using the Windows server and XAMPP to host Suite CRM.
I have tried as per documentation. But it failed.
Please suggest me which is the best way or step to get a successful result.
Hi,
To Run a CRON Job please follow the following steps:
1: Enable main CRON job in your server CRON TAB settings
. You can do this by “crontab -e” command.
Go to “Admin>>Scheduler” and copy the line to put the CRON entry into the server CRON TAB
2: Allow the related USER/USERS to run the CRON Job in “config.php” file
'allowed_cron_users' =>
array (
0 => 'www-data',
1 => abcd,
),
3: Go to “custom/modules/scheduler” and edit the file _add_jobs_here.php and simply follow this guide
https://docs.suitecrm.com/developer/scheduled-tasks/
4: Go to “Admin>>Scheduler” and
create your scheduler Job
Set interval for it
Set name for the job
Mark it as active
and here you go…………………
To check if the CRON is working you can put the logs into your CRON job function/code
Thanks a lot
1 Like
My CRON Jobs are running except for the geocode count scheduler that I created. Below are details I have given for the scheduler.
is the file accessible via URL?
Can you please set values for Active from and Active To fields.
1 Like
When I click the link from geocode count module, it gives a blank page but it updates the value.
Sure, will try adding Active from and Active To fields.
My Error log was:
“Job failed: ./index.php?module=jjwg_Maps&entryPoint=jjwg_Maps&cron=1”
“Job ddd00251-f9c1-a868-ab50-5dc3302c649c (Geocode CRON) failed in CRON run”
I was able to solve the issue by adding
$exJob[1] = str_replace(“amp;”,"",$exJob[1]); removes “amp;” strings from URL in SchedulersJob.php (Refer https://www.gitmemory.com/evgu)
as well as Job URL: in the scheduler as:
https://YOUR_HOSTNAME/index.php?module=jjwg_Maps&entryPoint=jjwg_Maps&cron=1
1 Like
Thank you. [Chuckles]
I had the same problem and entering the full URL, now works