Conditional workflow step

1,588 views
Skip to first unread message

Antony Seedhouse

unread,
May 6, 2013, 8:34:39 AM5/6/13
to rundeck...@googlegroups.com
Hello,

Has it been considered to have conditional workflow steps? I.e. execute the step if(something)?

For example, I have daily job, which runs every day, and a weekly job every Monday, and a monthly job on the 1st day of the month.

I want the jobs to run consecutively, and not simply calling one big bash script - that's what I moved to rundeck to get away from :)

In my daily control job, I would want a step to be, "if today is monday, trigger the weekly job".

Or am I missing an obvious already existing solution?

Thanks,
Antony


kcd

unread,
May 9, 2013, 8:01:56 PM5/9/13
to rundeck...@googlegroups.com
Hi

Could you do this with an error handler step. i.e. end the previous step with if Monday exit 1 else exit 0
Also for your particular example you would be better to schedule every Monday.

k

Moses Lei

unread,
May 9, 2013, 8:49:36 PM5/9/13
to rundeck...@googlegroups.com
Is there any reason they must run consecutively? If not I'd just schedule the weekly as a separate job and the monthly as a separate job.

One workaround for conditionals that truly must be conditional, more than RunDeck has built in, is to use RunDeck's "run" command. i.e. Have a script step with the conditional evaluated in whatever scripting language (bash would do, usually) and have the appropriate then clause execute "run -j jobname". If you need to block until the job is finished you can use -f (follow) option as well.

--
Moses Lei
Principal, Village Chime LLC
mobile: +1 703 901 5969 | skype: moseslei | yahoo: moseslei





--
You received this message because you are subscribed to the Google Groups "rundeck-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rundeck-discu...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Antony Seedhouse

unread,
May 15, 2013, 8:49:17 AM5/15/13
to rundeck...@googlegroups.com
They're run consecutively because they are database heavy (ETL) jobs. Running concurrently is slower than after each other :)

The workaround you suggested is what I came up with too and is what I'm doing for now.
Reply all
Reply to author
Forward
0 new messages