Coder Social home page Coder Social logo

Comments (9)

bkuhl avatar bkuhl commented on August 26, 2024

Can you show me the output of scheduled:summary?

from dispatcher.

hardevine avatar hardevine commented on August 26, 2024

@bkuhl

+----------------+---------------------+-----------+--------+------+--------------+-------+-------------+--------+
| Environment(s) | Name                | Args/Opts | Minute | Hour | Day of Month | Month | Day of Week | Run as |
+----------------+---------------------+-----------+--------+------+--------------+-------+-------------+--------+
| *              | populate:curr-rates |           | 0      | 9    | *            | *     | *           |        |
+----------------+---------------------+-----------+--------+------+--------------+-------+-------------+--------+

from dispatcher.

bkuhl avatar bkuhl commented on August 26, 2024

That summary couldn't have been generated by the PHP code you provided.

from dispatcher.

hardevine avatar hardevine commented on August 26, 2024

oh yes,

+----------------+---------------------+-----------+--------+------+--------------+-------+-------------+--------+
| Environment(s) | Name                | Args/Opts | Minute | Hour | Day of Month | Month | Day of Week | Run as |
+----------------+---------------------+-----------+--------+------+--------------+-------+-------------+--------+
| *              | populate:curr-rates |           | 17     | 4    | *            | *     | *           |        |
+----------------+---------------------+-----------+--------+------+--------------+-------+-------------+--------+

from dispatcher.

hardevine avatar hardevine commented on August 26, 2024

hmm, digging deep found something peculiar. My timezone is +5.30 in php & l4 so referencing mtdowling/cron-expression#55
commented out in HoursField.php

//$date->setTimezone(new DateTimeZone('UTC'));

this makes 'Invalid CRON expression' disappear, but now its getting stuck at

Inv.Arg.Excp - 'There are no commands defined in the xyz namespace'

manually running 'scheduled:run' / individual commands from ssh works,

even running individual artisan commands from cron works also, but not from, when 'dispatcher:run' is 'cronned' ;)

also #68 didnt worked.

dispatcher cron command (/usr/local/bin/php is cli-php; using cPanel):

cd /home/usr/pub_html/app && /usr/local/bin/php artisan scheduled:run 1>> /dev/null 2>&1

individual artisan command works:

cd /home/usr/pub_html/app && /usr/local/bin/php artisan footest 1>> /dev/null 2>&1

from dispatcher.

hardevine avatar hardevine commented on August 26, 2024

Running scheduled:run --debug from ssh gave

footest: /usr/bin/env php /home/usr/public_html/acme/artisan footest > /dev/null &

it helped to figure out that its using 'php' to run commands which is cgi version, but in cPanel cli is at '/usr/local/bin/php', so yeah all it needs is 'config::executable' path for php ie. #75

nailed (except 'cron-expression''s timezone bug ;), thanks @bkuhl 👍

from dispatcher.

bkuhl avatar bkuhl commented on August 26, 2024

I'm glad you got it working... there's a lot that went on in your last few comments so I'd like to clarify to be sure I understand what the solution is.

Are you saying that your sole fix was to customize the config::executable path to use /usr/bin/env?

from dispatcher.

hardevine avatar hardevine commented on August 26, 2024

@bkuhl before that i had to fix HoursField.php because it was causing 'Impossible CRON Expression'

from dispatcher.

usmanhalalit avatar usmanhalalit commented on August 26, 2024

@bkuhl, I'm having the exact same issue.

Laravel 4.2
"indatus/dispatcher": "1.4.*"
Forge Server with Linode.

Log:

{"message":"Impossible CRON expression","context":[],"level":400,"level_name":"ERROR","channel":"production","datetime":{"date":"2015-01-22 02:59:01.567212","timezone_type":2,"timezone":"EST"}

Summary:

+----------------+-----------------------------------+-----------+--------+------+--------------+-------+-------------+------+
| Environment(s) | Name                              | Args/Opts | Minute | Hour | Day of Month | Month | Day of Week | Run as |
+----------------+-----------------------------------+-----------+--------+------+--------------+-------+-------------+------+
| *              | cron:update_campaign_clicks_count |           | 0      | 0    | *            | *     | *           |        |
+----------------+-----------------------------------+-----------+--------+------+--------------+-------+-------------+--------+

Cron:

/usr/bin/php /home/forge/domain.com/artisan scheduled:run 1>> /dev/null 2>&1

Any help without hacking the package would be highly appreciated.

from dispatcher.

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.