Open RealKHFan opened 3 days ago
Hi,
Thank you for raising this issue and providing detailed information. I've created a minimal reproduction repository for this case to verify whether cron
is behaving as expected. The purpose of this repository is to simulate a cron job accurately with a schedule that triggers every Tuesday at 6 PM UTC.
After running multiple tests through this repo, the behavior you mentioned does not arise:
You can find the reproduction repository here:
👉 GitHub repo: cron-reproductions/918
I recommend pulling down the minimal reproduction repository and trying it within your environment directly.
If the issue persists or if you notice any anomalies while testing it in isolation, please share the findings and we’ll dig deeper.
Thank you for reproducing my issue. I will compare the data from my repository to yours.
Has it been tested on Ubuntu as well? Because the code that I showed gets executed on Windows for me
The Test works on my machine as well but again, its Windows, not Ubuntu
Has it been tested on Ubuntu as well? Because the code that I showed gets executed on Windows for me
Yes, I'm working on Ubuntu!
Description
I want my cron job to trigger on a Tuesday every week at 6pm, for that I created a new cronjob that does that, but it triggers whenever it wants, I tried different methods in usage but it still doesn't trigger on the time I want it to trigger. Note: after 10 weeks it triggered yesterday at 6pm 12/11/2024 Here is the code: Note that the code within my EventHandler is not the one which doesn't execute, I tried on my system before.
The system on which the discord bot is at is ubuntu
cron job version: 2.4.0
Expected Behavior
execute at 6pm on every week on a Tuesday
Actual Behavior
executes on a Sunday, Monday, Thursday, Friday at different times like 22:54, 20:32, 17:56 and some other times
Possible Fix
I am not sure why it occurs
Steps to Reproduce
use the same code and change the event handler to a console.log or something else
Context
I want my users to get notified at 6pm on a Tuesday every week
Your Environment
cron
version: 2.4.0