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

Command executing when not scheduled to do so... #90

Closed
hughsmith10 opened this issue Oct 17, 2014 · 11 comments
Closed

Command executing when not scheduled to do so... #90

hughsmith10 opened this issue Oct 17, 2014 · 11 comments

Comments

@hughsmith10
Copy link

I have a command in my laravel project that is executing at midnight when it is not scheduled to do so. Does anyone know why this would happen?

Here's my "schedule" function:

public function schedule(Schedulable $scheduler)
{
return $scheduler->daily()->hours(7);
}

...And here's the log output for today:

[2014-10-17 00:00:19] production.INFO: Market Report for October, 2014 : TO USER #101 [] []
[2014-10-17 07:00:03] production.INFO: Market Report for October, 2014 : TO USER #101 [] []

Not to complicate things, but the "every minute" cron is also setup to run as "root" (as suggested in the docs), and that causes other errors to occur when apache (via Laravel) tries to write to the log file later on.

ANY help, suggestions or advice would be much appreciated.

Thanks everyone!

  • Hugh
@bkuhl
Copy link
Member

bkuhl commented Oct 17, 2014

Can you post the output of php artisan scheduled:summary ?

@hughsmith10
Copy link
Author

+----------------+--------------------------------+-----------+--------+------+--------------+-------+-------------+--------+
| Environment(s) | Name                           | Args/Opts | Minute | Hour | Day of Month | Month | Day of Week | Run as |
+----------------+--------------------------------+-----------+--------+------+--------------+-------+-------------+--------+
| *              | bq:send-monthly-market-reports |           | 0      | 7    | *            | *     | *           |        |
| *              | bq:send-trial-expired-emails   |           | 30     | 11   | *            | *     | *           |        |
+----------------+--------------------------------+-----------+--------+------+--------------+-------+-------------+--------+

@bkuhl
Copy link
Member

bkuhl commented Oct 17, 2014

Which version of Dispatcher are you using?

@hughsmith10
Copy link
Author

v1.4.1

@tzookb
Copy link

tzookb commented Oct 20, 2014

I have similiar bug, I did:

  return $scheduler->everyMinutes(50);

and the action is called in min 50 and on min 00

@bkuhl
Copy link
Member

bkuhl commented Oct 23, 2014

@tzookb That syntax will result in the cron running every 50 minutes all day.

@tzookb
Copy link

tzookb commented Oct 23, 2014

yes....

that is exactly what i meant for, every **:50

but this gets fired every *:50 & *:00

and this is my bug....

@bkuhl
Copy link
Member

bkuhl commented Oct 24, 2014

@tzookb Can you show me the output of scheduled:summary please?

@tzookb
Copy link

tzookb commented Oct 24, 2014

I'm sorry, I was stupid I should use minutes not everyMinuts

//good
return $scheduler->minutes(50);
//bad
return $scheduler->everyMinutes(50);

@bkuhl
Copy link
Member

bkuhl commented Oct 25, 2014

@injeqt Did you resolve your issue?

@hughsmith10
Copy link
Author

Yes... I did. Sorry about that. I found out that one of our developers had
setup a Cron job on another server and was hitting a route at midnight...
so there's nothing wrong on your end.

Thanks so much for what you've created. It's awesome. I really appreciate
it.

  • Hugh

On Friday, October 24, 2014, Ben Kuhl notifications@github.com wrote:

@injeqt https://github.com/injeqt Did you resolve your issue?


Reply to this email directly or view it on GitHub
#90 (comment).


HUGH SMITH
hs@injeqt.com
Chief Bizoscopist

801.830.4141 cell
801.930.0005 office
888.696.1269 fax

INJEQT
770 E Main Street #205
Lehi, UT 84043 USA

http://injeqt.com


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

3 participants