I have created a scheduler Check Inbound Mailboxes to run every minute.However it always displays Last Successful Run: Never.On the job log it displays : Check Inbound Mailboxes running 04-04-2015 11:01am 04-04-2015 11:01am.And it has been like that for hours now.Nothing on the sugarcrmlogs and error logs on this, also I have noted that some other schedulers are running but others including : Optimise AOD Index,Perform Lucene Index,Run Scheduled Reports always have the Job status running.Any help on this?I have confirmed the cron is running and some jobs including Run Nightly Mass Email Campaigns and Run Nightly Process Bounced Campaign Emails are going to Done Status.What should I do for all tasks to complete running?
You need to set up your cronjob line(seen in Admin -> Schedulers) in your crontab on your web server.
Hello,
I have setup this as a Cron Task.Some of the Schedulers are actually running as expected.However the scheduler to Check Inbound Mailboxes does not work.It’s state is “Last Successful Run : Never” and the job log is always on running state and never completes.
Is it active? Have you setup your email and is your mail configuration on your server correct?
Yes it’s active.Also am using GMAIL and have enabled IMAP connections…and testing this from a Telnet client it’s successful. Also these schedulers : Optimise AOD Index,Perform Lucene Index,Run Scheduled Reports always have the Job status running and the Last Succesful run is always Never…just as in the Check Inbound Mailboxes scheduler
Then the crontab/cronjob is not set up correctly and is not running. You will need to test out the cron configuration and debug.
The crontab is setup correctly.I can confirm this because am sending all output to my mail and these come in every minute.As also detailed some of the schedulers including a Sample scheduler I have created that calls a URL that sends me a mail is actually working.Could it be that an error is encountered during the cron.php execution, where one of the schedulers has an error that affects the others?Can I test each scheduler individually?What are the logs I can use to check for errors on scheduler?
Hi there, you can set every other scheduler except 1 to inactive and run through and test each. If you want to check error logs, you can check the sugarcrm.log in the main CRM directory and also your error.log(located in your php error log location such as /var/log/apache2).
Been having the same problem and from a bit of searching turns out the pronlem lies with GMAIL. Looks like Google changed something few months ago. Try another email service and it should work
Hello,
this is caused on the number of queries in Gmail. (since few week`s)
Check all email settings in Admin and Email Module. Test In- and Outgoing funktion of personal Email.
-> Set the cron job, and the rhythm in the Email module to 5 minutes, then it should work. 1 minute anyway is impractical during query disturbs the call when creating or importing of messages.
PS: Give the scheduler a few minutes - start the server again, if necessary
If you have done that and it still does not work, then you have a permissions issue.
PPS: Will has already written it - disable all unnecessary Schedulars
I am a newbie trying to setup the inbound email. Is scheduler gonna work automatically or additional work in needed on the back end? Thank you.
ps: I cannot post new topic, any restriction on new users? thank you.
How to create Custom schedulers like that???
For adding Custom Scheduler follow the below steps:
Step1:- Goto
/custom/Extension/modules/Schedulers/Ext/ScheduledTasks
if not present create folder structure like this.
Step2:- Create a file (eg. update_user_day_count.php) under ScheduledTasks.
<?php
global $GLOBALS;
//================= Scheduler to update_user_day_count =================//
array_push($job_strings, 'update_user_day_count');
function update_user_day_count() {
// Business Logic
return true;
}
Step3:- Create another folder if not exists
/custom/Extension/modules/Schedulers/Ext/Language
and add file (in my case en_us.php)
Step4:- Add your Scheduler name in file
<?php
$mod_strings['LBL_UPDATE_USER_DAY_COUNT] = 'Update User Day Count;
Step5:- Goto Suite CRM repair rebuild.
Step6:- Goto Schedulers->create Scheduler Type JobName/Scheduler Name, Select Job (After successful repair rebuild, Custom Scheduler is added to Job list), Set an interval and Save.
Enjoy Coding B-)
PS: Please set Crontab for CRM in your system. To know how to set Crontab follow the steps given in Admin->Scheduler
is this method still working on current version 7.10.4 ?
i cant make it work, i dont see the new one in Schedulers after repair and rebuild
ok, it does work but when I do create scheduler -> job: I don’t see the new label 'Update User Day Count
I do see an empty line , chose the empty line, set the interval, and save .
then click on the new scheduler line and there I can see
Job: function::update_user_day_count
BTW if I do quick repair -> admin -> Scheduler -> create scheduler
in log I can see:
[FATAL] SugarBean::populateDefaultValues $field_defs should be an array
on save of scheduler I see in log:
[ERROR] Field date_time_end expecting datetime format, but got value:
forget of my earlier post I did mistakes in path
if someone will try do the same custom schedualer
original was :
<?php
$mod_strings['LBL_UPDATE_USER_DAY_COUNT] = 'Update User Day Count;
fix:
<?php
$mod_strings['LBL_UPDATE_USER_DAY_COUNT'] = 'Update User Day Count';