Scheduling script execution?

Is it possible to execute a script on a schedule using the module SDK library?
Similar to how the Ignition reports works.

I see SelfSchedulingRunnable a good starting point, but how would it be setup to run on the Gateway Hook?

Do you really need to schedule a script in your module? If you’re running Ignition 8.1.6 or later you can use scheduled scripts instead.

And if you do genuinely need to schedule your own custom runnable, you could always create your own cron4j instance. SelfSchedulingRunnable works to set your own time delay between executions, but isn’t as user friendly as specifically setting an event to fire ‘every monday at 8AM’ or something like that.

Ah, OK thanks.
I’ll look into cron4j/quartz.

Not wanting to open a new thread on the same/similar topic.

Is there any way to have the user interact with a gateway scheduled script. In particular, to change the schedule on which it runs? Otherwise I need to look at the cron4j as discussed here.

No, there’s no way to manipulate a scheduled script to run at a different execution schedule.