HELP - How to Run a Script Everyday Exact time

Hi.
I’m currently running a script that need to be run exact time daily. My schedule setup as follows.
Capture.PNG
the script is running with interval of 1 day. but not exact time as i needed. I need everyday mid night zero or a second pass midnight.


The script run to update a Google Spreadsheet with my daily internet usage data. as you can see below, it delays the update each day by a second or so. 1st day it took 4 seconds & 12 days later now it took 12 seconds.

here my spreadsheet updated time. which is updating each day by adding a second to the schedule time. if this continues, after 60 days the script will run with a minute later.
capp.png

When you disable the scheduler and re-enabled it, it start again at 00:00?

If the script start at 00:00, can’t end at 00:00, depending on what the script do.
If the script interact with web, probably some delays happen on remote site…

@siri, maybe your clock is drifting. Do you sync the time using NTP?

Register the time Global) when the script completes. Set a delay of 3600 seconds at the start of the script.

Set the start time to 23:00:00

Next day, makes the delay = 3600s-$toredTime (Global)

On reboot/start Global $toredTime is not existing so create a check to set it to 00:00:00 as first in a script.

Ofcourse having a working NTP is important.

Thank you everyone. as suggest above, it looks like time sync issue. i have checked the router time with my PC time. it has 8 second delay