I'm playing a bit with openwhisk in IBM Bluemix and now I'm looking for a way to shedule a one shot action.
I know I can run actions at fixed intervals, in a "cron" fashion using 'feed /whisk.system/alarms/alarm'. What I am looking for is similar to the at
linux command.
The closest I figured out involves another server used to generate events, but I would like to be as "serverless" as possible.
Another non desirable solution would be using js setTimeout
but... I suppose that would waste execution time. (And possibly hitting execution time limit)
Thanks in advance.
Use a cron schedule with appropriate fields and the
maxTriggers
parameter set to 1.The
maxTriggers
parameter ensures that, after a single event, the trigger won't be called again.One-off triggers can be created from the command-line.
Here's an example for a trigger to run once at 1st January @ 00:00.
There is an open issue in the open-source repo to provide better support for these kind of events. https://github.com/apache/incubator-openwhisk-package-alarms/issues/89