-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Thanks for the tool using the cron syntax is working perfectly so hopefully there is a simple answer for this that I'm not quite getting atm..
I'm trying to use the every option when cron strings don't make sense for example if a user wants to execute a job every 3 days or every X days. My bull queue version is "bull": "^4.16.5",
I've added three jobs one for 66 days which I thought maybe was too big?.. Maybe integer overflow because your taking milliseconds? So then I tried 3 days and 6 days none of which seem to be getting executed at the right time.
The date to day is 8 of August.
24 * 60 * 60 * 1000 * 3 = 259200000 three days.
24 * 60 * 60 * 1000 * 6 = 518400000 6 days.
24 * 60 * 60 * 1000 * 66 = 5702400000 66 days.
new Date(24 * 60 * 60 * 1000 * 66 + new Date().getTime())
Mon Oct 13 2025 11:15:16 GMT+1100 (Australian Eastern Daylight Time)
new Date(24 * 60 * 60 * 1000 * 6 + new Date().getTime())
Thu Aug 14 2025 10:15:44 GMT+1000 (Australian Eastern Standard Time)
new Date(24 * 60 * 60 * 1000 * 3 + new Date().getTime())
Mon Aug 11 2025 10:16:05 GMT+1000 (Australian Eastern Standard Time)
So maybe the 3 days is working as in its just off by a timezone error..
I also queried the queue directly to get the next values and they match what the bull queue is showing..
"0": {
"key": "68943cdb6c550:::5702400000",
"name": "68943cdb6c550",
"id": null,
"endDate": null,
"tz": null,
"cron": null,
"every": 5702400000, // 66 days
"next": 1756339200000 // Fri Aug 08 2025 10:23:23 GMT+1000 (Australian Eastern Standard Time)
},
"1": {
"key": "68953d55a2593:::518400000",
"name": "68953d55a2593",
"id": null,
"endDate": null,
"tz": null,
"cron": null,
"every": 518400000, // 6 days
"next": 1754784000000 // Sun Aug 10 2025 10:00:00 GMT+1000 (Australian Eastern Standard Time)
},
"2": {
"key": "68953c009e892:::1296000000",
"name": "68953c009e892",
"id": null,
"endDate": null,
"tz": null,
"cron": null,
"every": 1296000000, // 3 days
"next": 1754784000000 // Sun Aug 10 2025 10:00:00 GMT+1000 (Australian Eastern Standard Time)
},