Skip to main content

Hi,

 

Is it possible to schedule a certain workflow to run at certain times in K2 BlackPoint. For example: a certain workflow should run every 2 hours or every monday morning.

 If not, is it possible in K2 BlackPearl?

What's the best way to do this?

 

 Thanks!

Jonas

K2 does not do any such kind of polling, and should not be used for it, so I would recommend either you write a custom service that does the scheduling, or you could use something like Windows Scheduled tasks to run a script that starts a process. Thereby all the scheduling will be handled by Windows it self, and this will probably be the quickest easiest solution, although you still have to write your own script to do this.

Whatever you do, please do not write a process that escalates (for instance every two hours, every monday, etc) and in the escalation it calls an IPC to start your process. K2 is not made for this kind of polling and you will cause many problems (and support issues) in the long run. 

Hope that helps, 


That's what I tought. My first "solution" was to set a start rule on an activity of 2 hours, then create a loopback with a line to it.

What's the best way then to create a script to start a workflow, the problem is that in SharePoint (as far as I know) you always have to create some kind of document or item to start a workflow so I could create a script that makes an item that then starts the workflow but this is also very dirty if you ask me.


Hi GLouw


 I wondered if you've run across specific problems with the placing delays on the Start Activity like Jonas describes to handle this type of similuated scheduling activity.  Whether its a 1 day delay or uses a dynamic date process datafield that gets updated with the new date everytime its run.


I wouldn't think that having an activity start up and run once or a couple times a day would be an issue with performance with K2 but maybe you've seen some unexpected issues that can arise that you could share.  Or have the problems you've seen been more with using escalations to try and implement scheduling?


In blackpearl you can use the scheduling API to cause processes to start at scheduled times and intervals. 

Reply