Scheduling workflows

0 views
Skip to first unread message

cappelaere

unread,
Sep 4, 2007, 8:59:23 PM9/4/07
to OpenWFEru users
OpenWFERu has a scheduler.
One thing I seem to be missing (sorry for the question) is this:
If I want to schedule a workflow at a specific time or at a delta time
or repetitively, should I handle this myself or shouldn't this be
handled by the engine itself via additional arguments to
engine.launch?
Thanks,
Pat.

John Mettraux

unread,
Sep 4, 2007, 9:10:14 PM9/4/07
to openwfe...@googlegroups.com

Hi Pat,

Sounds like a great idea.

Out of the box, you can do

$engine.get_scheduler.schedule_at tomorrow_noon do
$engine.launch(myLaunchItem)
end

I also have to reread my doc about processes scheduling other processses.


I understand your idea like :

$engine.launch(whatever, :at => tomorrow_noon)
$engine.launch(whatever, :cron => "5 0 * * *") # every day, five
minutes after midnight

Is that it ?

Would you like the engine to keep track of those schedules (make them
survive an engine restart ?)


Best regards,

--
John Mettraux -///- http://jmettraux.openwfe.org

Pat Cappelaere

unread,
Sep 4, 2007, 9:29:05 PM9/4/07
to openwfe...@googlegroups.com
Yes. :)

$engine.launch(whatever, :immediately )
$engine.launch(whatever, :at => DateTime.now + 1d)
$engine.launch(whatever, :in => 30s)


$engine.launch(whatever, :cron => "5 0 * * *") # every day, five

Surviving an engine restart would be going for brownie points.
:)
Pat.

John Mettraux

unread,
Sep 4, 2007, 9:33:30 PM9/4/07
to openwfe...@googlegroups.com
On 9/5/07, Pat Cappelaere <cappe...@gmail.com> wrote:
>
> Yes. :)
>
> $engine.launch(whatever, :immediately )
> $engine.launch(whatever, :at => DateTime.now + 1d)
> $engine.launch(whatever, :in => 30s)
> $engine.launch(whatever, :cron => "5 0 * * *") # every day, five
>
> Surviving an engine restart would be going for brownie points.
> :)

OK,

http://rubyforge.org/tracker/index.php?func=detail&aid=13665&group_id=2609&atid=10026

will do it.


Thanks and best regards,

Pat Cappelaere

unread,
Sep 4, 2007, 9:41:39 PM9/4/07
to openwfe...@googlegroups.com
Do they have brownies in Japan? Or will I need to send you some?

Thanks,
Pat.


> From: John Mettraux <jmet...@openwfe.org>
> Reply-To: <openwfe...@googlegroups.com>
> Date: Wed, 5 Sep 2007 10:33:30 +0900
> To: <openwfe...@googlegroups.com>
> Subject: [openwferu-users] Re: Scheduling workflows
>
>

John Mettraux

unread,
Sep 4, 2007, 9:45:22 PM9/4/07
to openwfe...@googlegroups.com
On 9/5/07, Pat Cappelaere <cappe...@gmail.com> wrote:
>
> Do they have brownies in Japan? Or will I need to send you some?

Yes, the classical (commercial) ones and the ones at Starbucks.

I'm sure you could send me the "real stuff" :)


Cheers,

John Mettraux

unread,
Sep 5, 2007, 9:21:58 PM9/5/07
to openwfe...@googlegroups.com
On 9/5/07, John Mettraux <jmet...@openwfe.org> wrote:
> On 9/5/07, Pat Cappelaere <cappe...@gmail.com> wrote:
> >
> > Yes. :)
> >
> > $engine.launch(whatever, :immediately )
> > $engine.launch(whatever, :at => DateTime.now + 1d)
> > $engine.launch(whatever, :in => 30s)
> > $engine.launch(whatever, :cron => "5 0 * * *") # every day, five
> >
> > Surviving an engine restart would be going for brownie points.
> > :)
>
> OK,
>
> http://rubyforge.org/tracker/index.php?func=detail&aid=13665&group_id=2609&atid=10026

Hi Pat,

fei = $engine.launch(a_process, :in => "10m30s")
fei = $engine.launch(a_process, :cron => "5 0 * * *")

fei will not be the identifier for the scheduled process (but rather
the one of the scheduling process).


OK ?

Pat Cappelaere

unread,
Sep 5, 2007, 10:44:55 PM9/5/07
to openwfe...@googlegroups.com
The workflow parameters are going to be passed to the scheduled workflow
right?
Pat.


> From: John Mettraux <jmet...@openwfe.org>
> Reply-To: <openwfe...@googlegroups.com>
> Date: Thu, 6 Sep 2007 10:21:58 +0900
> To: <openwfe...@googlegroups.com>
> Subject: [openwferu-users] Re: Scheduling workflows
>
>

John Mettraux

unread,
Sep 5, 2007, 11:39:19 PM9/5/07
to openwfe...@googlegroups.com
On 9/6/07, Pat Cappelaere <cappe...@gmail.com> wrote:
>
> The workflow parameters are going to be passed to the scheduled workflow
> right?

Yes, via the LaunchItem if one is used.

engine.launch(launch_item, :at => whenever)
engine.launch(process_definition, :at => whenever)

No changes for the 1st parameter of the launch method.


Best regards,

John Mettraux

unread,
Sep 11, 2007, 6:54:53 AM9/11/07
to openwfe...@googlegroups.com
On 9/6/07, John Mettraux <jmet...@openwfe.org> wrote:
> On 9/6/07, Pat Cappelaere <cappe...@gmail.com> wrote:
> >
> > The workflow parameters are going to be passed to the scheduled workflow
> > right?
>
> Yes, via the LaunchItem if one is used.
>
> engine.launch(launch_item, :at => whenever)
> engine.launch(process_definition, :at => whenever)

Hi,

it's been implemented (revision 1022).

It understands :in, :at and :cron, and it survives engine restarts.

The implementation is not that elegant, still scratching my head.

Reply all
Reply to author
Forward
0 new messages