Job failed in CRON run (7.5)

I added a job to the scheduler which runs every day at 3am.
I tested the job without the scheduler and it works without any problems.
I also configured cron correctly, it starts every day at 3am.
But it never did anything and in the sugar log every day at exactly 3am I can find this:
Job ec328077-2b64-1527-301c-559dc9c02252 (autoImportAccounts) failed in CRON run
Where is the problem?
Parents
  • Hi Dominik,

    If this is a custom job, you need to be sure that it uses a return statement that evaluates to true (e.g.: return(true);). This is how Sugar knows the job completed successfully. See Adding your own recurring jobs to the Scheduler for more details. If this does not help, you may want to watch your Sugar and web server logs for errors while the job is running.

    Thanks,

    Jason
  • Hi,

    There is a return true; at the end.
    And the job should have a duration of 20 minutes but the log is already at 3am.
    There are no other logs arround this time.
    Only at 5am I always have this one:
    [ERROR] [SessionLock] Session lock was held for 6 seconds which is longer than the maximum of 1 seconds. Request details: 
                    SERVER_NAME     |                   SERVER_ADDR     |                   SCRIPT_FILENAME | cron.php                  REQUEST_METHOD  |                   SCRIPT_NAME     | cron.php                  REQUEST_URI     |                   QUERY_STRING    |   Could this cause the problem?
Reply
  • Hi,

    There is a return true; at the end.
    And the job should have a duration of 20 minutes but the log is already at 3am.
    There are no other logs arround this time.
    Only at 5am I always have this one:
    [ERROR] [SessionLock] Session lock was held for 6 seconds which is longer than the maximum of 1 seconds. Request details: 
                    SERVER_NAME     |                   SERVER_ADDR     |                   SCRIPT_FILENAME | cron.php                  REQUEST_METHOD  |                   SCRIPT_NAME     | cron.php                  REQUEST_URI     |                   QUERY_STRING    |   Could this cause the problem?
Children
No Data