/
SCHED Library

SCHED Library

The SCHED library is a helpful library for scheduling a process to run once a day at a specific hour of day. This is useful for running batch processes.

Use the scheduler.runAt() function to specify when a function or process should execute. Additional arguments can be passed for the function that will be called.

scheduler.runAt(11.5, DoBatchProcess, "Some Argument", "Second Argument", "etc...")

When run for the first time, the function will execute the batch process once and store the last run time in a text file in the working directory. Subsequent calls will check the current time and compare it with the scheduled run time and last run time. This also means that a smaller component polling interval will result in a more timely execution.