VMware Cloud Community
jbweber2
Enthusiast
Enthusiast

vco task scheduler

I'm trying to reimplement a vCAC extensibility use case using vCO and I need some feedback on my possible implementation.

Today I've got a scheduled workflow in vCAC which runs every 30 seconds and also is considered a "singleton" workflow.

This workflow will run every 30 seconds (not explicit interval, but it runs 30 seconds after the previous run completes), and at any given time there can only be a single instance of the workflow running.

The vCO options don't seem to have something which works quite what I was looking for. As far as I could tell what I need to do is to create a schedule which runs every minute and then set it to run @ 00s and @ 30s to give me something which runs every 30 seconds.

To get a situation like "single instance at a time" I was considering using a lock inside of my workflow, so if I can't obtain the lock I assume another instance of the workflow is running.

When actually running a schedule which looks like this however it doesn't seem to work like I expect. Initially the workflow was not running at all, and now it doesn't look like it runs @ 00 and @ 30, it only seems to run @ 00.

Is there a better way to implement something like this?

0 Kudos
1 Reply
cdecanini_
VMware Employee
VMware Employee

If it needs to run every 30 seconds except when another one is running I would use a parent workflow that start it, when it finishes check end date - start date. If >= 30 sec run the workflow, if less set sleep time of 30 seconds - time taken by the wrkflow to run.

I would avoid scheduling workflows for such small time intervals. I also avoid using the locking system when I can.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter
0 Kudos