bree icon indicating copy to clipboard operation
bree copied to clipboard

cron job starts after timeout not after definition

Open tripower opened this issue 2 years ago • 2 comments
trafficstars

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 avatar Jul 24 '23 19:07 tripower

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 avatar Jul 25 '23 16:07 tripower

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

tripower avatar Jul 30 '23 10:07 tripower