Git Product home page Git Product logo

Comments (5)

liebig avatar liebig commented on July 24, 2024

Hi @h-rafiee,
I am sorry for the problem with your job execution on midnight and I will try to help you. So you scheduled a Cron job for midnight(0 0 * * *) and added this expression to crontab, too. But the job does not run on midnight, but on 05:10:25?

Please check your Laravel timezone in your config/app.php file. This timezone should be the same to your system timezone. Please only use PHP supported timeszones. If this is correct, please change the Cron expression to every minute (* * * * *). Because crontab only runs Cron at midnight, the Cron job should only run once at midnight. While the expression is equals every minute, the Cron job will always run, if Cron is executed. You can also have a look at your Laravel log files. There you find information about Cron.

Another note, you don't have to enable the added Cron job with the function setEnableJob and the job name ordersValidation because it is enabled by default. And for testing it is a good way to return a String from the anonymous Cron function. But for production please return null if everything was okay or Cron will assume that there was an error while executing the job.

from cron.

h-rafiee avatar h-rafiee commented on July 24, 2024

Thanks it's works fine with crontab * * * * 👍

from cron.

liebig avatar liebig commented on July 24, 2024

Okay, then it seems to be a problem with your Laravel timezone. Please check.

from cron.

liebig avatar liebig commented on July 24, 2024

Whups, did you mean with Cron or Crontab and the expression * * * * *? If the Cron expression is 0 0 * * * and crontab runs every minute, there will be a problem with crontab. But if you run crontab only once a day (0 0 * * *) and the Cron job always (* * * * *) and this works now, you have to check the Laravel timezone.

from cron.

h-rafiee avatar h-rafiee commented on July 24, 2024

Now. i have two Cron jobs per minute and per day... i must run crontab for
every minute and Run all jobs . it's work fine thanks again

On Mon, Mar 16, 2015 at 2:45 PM, liebig [email protected] wrote:

Whups, did you mean with Cron or Crontab and the expression * * * * ? If
the Cron expression is 0 0 * * * and crontab runs every minute, there
will be a problem with crontab. But if you run crontab only once a day (0
0 * * *) and the Cron job always (
* * * *) and this works, you have to
check the Laravel timezone.


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

Artist | Design & Interfaces
Iran
Software Engineer
Programmer

Designer

[email protected]
[email protected]
[email protected]

Twitter http://twitter.com/HRafiee91\- Deviantart
http://h-rafiee.deviantart.com/

from cron.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.