If possible change the Offline KScript to Online KScript
Scripting | Scripts
Click on the script link you want to edit
Under Configure | Type select Online KScript from the pulldown menu and save your script
Be aware that Online KScript use the the appliance time and not the client time. Also the system needs to be connected of course when executing the script.
If Offline KScript is the only option then the time of execution best can be handled by the script itself to cover all circumstances.
Please note that Technical support does not support writing scripts/coding as such