Logic Machine Forum
Scheduled script, seconds? - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Scheduled script, seconds? (/showthread.php?tid=4379)



Scheduled script, seconds? - sx3 - 15.11.2022

Hello,

For the Scheduled script, is it possible to somehow tell it to run at specific second?
I have a script that runs at midnight 00:00:00.
And I have a second script that runs every hour at minute 00 that is depending on values from the first script.

I want to be sure that script 1 is executed and finnished, before the hourly script runs.
But I don't want to set the schedule to run on minute 01 every hour, but something like minute 00, 30 seconds.

Possible to push in another attribute in the minute colum? Like 00:30 to make this happen?


RE: Scheduled script, seconds? - admin - 15.11.2022

Add os.sleep(30) to the script you want to delay.


RE: Scheduled script, seconds? - sx3 - 15.11.2022

(15.11.2022, 08:39)admin Wrote: Add os.sleep(30) to the script you want to delay.

Ahh alright, so in the beginning of Script #2, I'll tell it to delay 30 seconds in the beginning?
Will os.sleep() put other script in queue or will the execute as normal during the sleep period?
For examepl if I have residential script or event-based, will they run as normal if other script run os.sleep()?


RE: Scheduled script, seconds? - Daniel - 15.11.2022

os.sleep will affect only the script you are using it in.


RE: Scheduled script, seconds? - sx3 - 15.11.2022

Thanks guys! You are the best! Smile