Thanks! If it makes it any easier, there's already a pre-built NPM for cron jobs available here.
The great thing about cron scheduling is that it can be one-time (e.g. run once on a specific date and time) or can be used for scheduling a process to run at regular intervals. This will give the skill more flexibility in assigning scheduled tasks when needed.
If you don't want to give your skills that much power, you can always create a wrapper on top of the cron npm to allow for Jibo to set the scheduling instead...for example:
var scheduledTask = jibo.setScheduledTask(new Date(), "sample-tree.bt");
Run every weekday at (or around) 11:30pm
var scheduledTask = jibo.setScheduledTask("00 30 23 * * 1-5", "sample-flow.flow");
These examples just run a behavior tree or flow directly, but I could imagine a slightly different version that runs the entire skill directly instead with the ability to pass in parameters that could allow the skill to "switch" to scheduled task mode.
Thanks for looking into it and getting back to me.