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

Trying to Schedule Specific Day cron jobs #45

Closed
averybross opened this issue Mar 13, 2014 · 1 comment
Closed

Trying to Schedule Specific Day cron jobs #45

averybross opened this issue Mar 13, 2014 · 1 comment

Comments

@averybross
Copy link

Hey, so when I feed Jobby "{"name":"52-excel-03/12/2014","command":"/usr/local/bin/php auto-excel-prep.php 52","schedule":"44 22 12 03 *","output":"log-excel.txt","enabled":"true"}"

and I get:

[12-Mar-2014 20:42:01 America/Denver] PHP Fatal error: Uncaught exception 'InvalidArgumentException' with message '00 9 is not a valid CRON expression' in /home/brentst1/public_html/sociallev/respond/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php:105
Stack trace:
#0 /home/brentst1/public_html/sociallev/respond/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php(90): Cron\CronExpression->setExpression('00 9 ')
#1 /home/brentst1/public_html/sociallev/respond/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php(78): Cron\CronExpression->__construct('00 9 ', Object(Cron\FieldFactory))
#2 /home/brentst1/public_html/sociallev/respond/vendor/hellogerard/jobby/src/Jobby/BackgroundJob.php(180): Cron\CronExpression::factory('00 9 ')
#3 /home/brentst1/public_html/sociallev/respond/vendor/hellogerard/jobby/src/Jobby/BackgroundJob.php(67): Jobby\BackgroundJob->shouldRun()
#4 /home/brentst1/public_html/sociallev/respond/vendor/hellogerard/jobby/src/Jobby/BackgroundJob.php(304): Jobby\BackgroundJob->run()
#5 {main}

thrown in /home/brentst1/public_html/sociallev/respond/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php on line 105
[12-Mar-2014 20:42:01 America/Denver] PHP Fatal error: Uncaught exception 'InvalidArgumentException' with message '42 20 is not a valid CRON expression' in /home/brentst1/public_html/sociallev/respond/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php:105
Stack trace:
#0 /home/brentst1/public_html/sociallev/respond/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php(90): Cron\CronExpression->setExpression('42 20 ')
#1 /home/brentst1/public_html/sociallev/respond/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php(78): Cron\CronExpression->__construct('42 20 ', Object(Cron\FieldFactory))
#2 /home/brentst1/public_html/sociallev/respond/vendor/hellogerard/jobby/src/Jobby/BackgroundJob.php(180): Cron\CronExpression::factory('42 20 ')
#3 /home/brentst1/public_html/sociallev/respond/vendor/hellogerard/jobby/src/Jobby/BackgroundJob.php(67): Jobby\BackgroundJob->shouldRun()
#4 /home/brentst1/public_html/sociallev/respond/vendor/hellogerard/jobby/src/Jobby/BackgroundJob.php(304): Jobby\BackgroundJob->run()
#5 {main}

thrown in /home/brentst1/public_html/sociallev/respond/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php on line 105
[12-Mar-2014 20:42:02 America/Denver] PHP Fatal error: Uncaught exception 'InvalidArgumentException' with message '42 -1 is not a valid CRON expression' in /home/brentst1/public_html/sociallev/respond/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php:105
Stack trace:
#0 /home/brentst1/public_html/sociallev/respond/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php(90): Cron\CronExpression->setExpression('42 -1 ')
#1 /home/brentst1/public_html/sociallev/respond/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php(78): Cron\CronExpression->__construct('42 -1 ', Object(Cron\FieldFactory))
#2 /home/brentst1/public_html/sociallev/respond/vendor/hellogerard/jobby/src/Jobby/BackgroundJob.php(180): Cron\CronExpression::factory('42 -1 ')
#3 /home/brentst1/public_html/sociallev/respond/vendor/hellogerard/jobby/src/Jobby/BackgroundJob.php(67): Jobby\BackgroundJob->shouldRun()
#4 /home/brentst1/public_html/sociallev/respond/vendor/hellogerard/jobby/src/Jobby/BackgroundJob.php(304): Jobby\BackgroundJob->run()
#5 {main}

thrown in /home/brentst1/public_html/sociallev/respond/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php on line 105
[12-Mar-2014 20:42:02 America/Denver] PHP Fatal error: Uncaught exception 'InvalidArgumentException' with message '42 3 is not a valid CRON expression' in /home/brentst1/public_html/sociallev/respond/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php:105
Stack trace:
#0 /home/brentst1/public_html/sociallev/respond/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php(90): Cron\CronExpression->setExpression('42 3 ')
#1 /home/brentst1/public_html/sociallev/respond/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php(78): Cron\CronExpression->__construct('42 3 ', Object(Cron\FieldFactory))
#2 /home/brentst1/public_html/sociallev/respond/vendor/hellogerard/jobby/src/Jobby/BackgroundJob.php(180): Cron\CronExpression::factory('42 3 ')
#3 /home/brentst1/public_html/sociallev/respond/vendor/hellogerard/jobby/src/Jobby/BackgroundJob.php(67): Jobby\BackgroundJob->shouldRun()
#4 /home/brentst1/public_html/sociallev/respond/vendor/hellogerard/jobby/src/Jobby/BackgroundJob.php(304): Jobby\BackgroundJob->run()
#5 {main}

thrown in /home/brentst1/public_html/sociallev/respond/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php on line 105
[12-Mar-2014 20:42:02 America/Denver] PHP Fatal error: Uncaught exception 'InvalidArgumentException' with message '42 6 is not a valid CRON expression' in /home/brentst1/public_html/sociallev/respond/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php:105
Stack trace:
#0 /home/brentst1/public_html/sociallev/respond/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php(90): Cron\CronExpression->setExpression('42 6 ')
#1 /home/brentst1/public_html/sociallev/respond/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php(78): Cron\CronExpression->__construct('42 6 ', Object(Cron\FieldFactory))
#2 /home/brentst1/public_html/sociallev/respond/vendor/hellogerard/jobby/src/Jobby/BackgroundJob.php(180): Cron\CronExpression::factory('42 6 ')
#3 /home/brentst1/public_html/sociallev/respond/vendor/hellogerard/jobby/src/Jobby/BackgroundJob.php(67): Jobby\BackgroundJob->shouldRun()
#4 /home/brentst1/public_html/sociallev/respond/vendor/hellogerard/jobby/src/Jobby/BackgroundJob.php(304): Jobby\BackgroundJob->run()
#5 {main}

thrown in /home/brentst1/public_html/sociallev/respond/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php on line 105

@mtdowling
Copy link
Owner

Somehow it looks like "'00 9" was passed in as a cron expression. Seems like there's a problem somewhere else where the expression is being provided to the cron parser.

peter279k pushed a commit to peter279k/cron-expression that referenced this issue Nov 25, 2020
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