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

cron job starts after timeout not after definition #223

Open
tripower opened this issue Jul 24, 2023 · 2 comments
Open

cron job starts after timeout not after definition #223

tripower opened this issue Jul 24, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@tripower
Copy link

Hello

my cron job definition is
'0 35 17 * * *'
so, it should run once a day at 17:35

to prevent maybe an other bug
(because job starts at 17:34:58 and runs so twice)
so I tried the attribute timeout '30sec'
but with that, the job starts after startup of the program and not at the defined time with defined timeout

17:35:30

any ideas?
thx

greetings
Klaus

@tripower tripower added the bug Something isn't working label Jul 24, 2023
@tripower
Copy link
Author

tripower commented Jul 25, 2023

update 25.07.2023:

results:
at PC1 with definition:
"0 35 17 * * *"
timeout: 30sec

START: 25.7.2023, 17:34:58
START: 25.7.2023, 17:35:01

at PC2 with definition
"0 35 17 * * *"

START: 25.7.2023, 17:49:43
START: 25.7.2023, 17:50:00

update 26.07.2023:
it seems to work with my sleep function inside the task
but this can only be a hack and not a solution!

update 28.07.2023:
START: 25.7.2023, 17:34:58
START: 25.7.2023, 17:35:01
START: 26.7.2023, 17:35:00
START: 27.7.2023, 17:34:58
START: 28.7.2023, 17:34:58

works with hack
but why start the job before 17:35???

@tripower
Copy link
Author

tripower commented Jul 30, 2023

my workaround

attribute at workerdata to set value for seconds
and
at the beginning of a cron task job
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics/wait

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant