question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cron expression error and cron job not working as expected.

See original GitHub issue

According to the docs image

First thing is the cron expression link that you’ve mentioned in the docs results in error with “Unexpected end of expression.” image

I used the same cron expression in the code: image

And cron runs every second : image

Here’s the code for queue, worker and required things :

image

image

image

node version : v11.14.0

"bullmq": "^1.9.0",

Redis: image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sbleoncommented, Nov 6, 2020

Oh, wow! It’s pretty bad to have that link in the docs. That should definitely be changed.

1reaction
sbleoncommented, Nov 5, 2020

@5achinJani, “15 3 * * *” is definitely a valid cron expression: Screen Shot 2020-11-05 at 1 30 20 PM See also: https://en.wikipedia.org/wiki/Cron

It look like the tool you’re using is trying to evaluate the expression using as a “Quartz cron” expression, which is a non-standard format. (In my opinion, it’s deeply irresponsible of Quartz to use the word “cron” when their formats are not interoperable.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cron job troubleshooting guide - Cronitor
The common reasons cron jobs fail · Schedule errors are easy to make. Cron job schedule expressions are quirky and difficult to write....
Read more >
Top Reasons Your Cron Job Isn't Running - Airplane.dev
This article walks through the most common reasons why your cron job may not be working as expected: schedule errors, environmental changes, ...
Read more >
Why is my crontab not working, and how can I troubleshoot it?
The vast majority of "my cron script doesn't work" problems are caused by this restrictive path. If your command is in a different...
Read more >
linux - CronJob not running - Stack Overflow
WTF?! My cronjob doesn't run?! Here's a checklist guide to debug not running cronjobs: Is the Cron daemon running? Run ps ax |...
Read more >
Why crontab scripts are not working? - Ask Ubuntu
cron ignores PATH from that file, so runnning somecommand from your script will fail when run with cron, but work when run in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found