Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some jobs not executed #42

Closed
ArberD opened this issue Oct 2, 2014 · 3 comments
Closed

Some jobs not executed #42

ArberD opened this issue Oct 2, 2014 · 3 comments
Assignees

Comments

@ArberD
Copy link

ArberD commented Oct 2, 2014

Hi Liebig,

Some of the jobs I schedule never get executed.

For example, a job with expression '25 11 * * 4' which should execute each Thursday at 11:25 is skipped (cron manager does execute fine). It seems to me that the isDue function is not parsing my expression correctly so it is never matched?

Any help would be greatly appreciated.

Thanks for this awesome package!

@liebig
Copy link
Owner

liebig commented Oct 2, 2014

Hi ArberD,

Thank you for using Cron. I am sorry that you had trouble with your job execution. Your expression looks good. So you checked the cron_manager database table and there is an entry from today 11:25 but no executed jobs with this manager id in the cron_job table at the cron_manager_id field?

I tested a similar expression and unfortunately it worked for me:
routes.php

Route::get('/crontest', function () {
        Cron::add('example1', '35 13 * * 4', function() {

            return 'Example 1 ran';
        });     

    $report = \Liebig\Cron\Cron::run();
    var_dump($report);
});

Output at 13:35, today:

array (size=6)
  'rundate' => int 1412249701
  'inTime' => boolean true
  'runtime' => float 0.0030450820922852
  'errors' => int 1
  'crons' => 
    array (size=1)
      0 => 
        array (size=3)
          'name' => string 'example1' (length=8)
          'return' => string 'Example 1 ran' (length=13)
          'runtime' => float 1.5020370483398E-5
  'lastRun' => 
    array (size=2)
      'rundate' => string '2014-10-02 13:34:01' (length=19)
      'runtime' => string '0.00040197372436523' (length=19)

Can you please test again? When nothing helps, please provide me the database cron_manager and cron_job table entries at your expression date?

@liebig liebig self-assigned this Oct 2, 2014
@ArberD
Copy link
Author

ArberD commented Oct 2, 2014

Hello,

Thanks for your quick reply. This is so embarrassing - my Laravel timezone was different from system timezone. I set the correct timezone and all is good now.

Thanks again for this awesome package and your support

@ArberD ArberD closed this as completed Oct 2, 2014
@liebig
Copy link
Owner

liebig commented Oct 2, 2014

Hi ArberD,

Thank you for your reply. You are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants