Action contingency

(imported topic written by jpeppers91)

I want to create a task with 2 actions. I want the task to process my command file #1 that I’ve created. If the action fails I need the entire task to fail, if it completes I need it to got to the next action script and run my command file #2. Any ideas how to do this?

(imported comment written by jessewk)

You’ll want to create one action. The first part of the action processes your command file. Then use a ‘continue if’ statement to check that the command file completed successfully and move onto the second part of the action. If the ‘continue if’ statement fails the whole action will report as failed and the second portion will not run.

Jesse

(imported comment written by jpeppers91)

I’m having trouble getting this to work. My first action runs perfectly and does a reboot. How can I pause the action until the box comes back up and process the second part of the action?

(imported comment written by jessewk)

You’ll want to use 2 separate Fixlets. I’d put them in a baseline and perform the reboot as part of the first Fixlet’s action script. There are several threads here that detail how to put a restart in between components of a baseline.

(imported comment written by jpeppers91)

When I create a baseline for the 2 tasks, it never runs. I am I missing something?

(imported comment written by jessewk)

After creating the baseline you must then take an action from it the same way you take an action from a Fixlet. There’s a link at the bottom of the baseline description.

(imported comment written by jpeppers91)

I took the action but it never runs on the machines. It runs if I run them individually.

jp

(imported comment written by jessewk)

Ah. Sorry terminology got in the way there for a second.

In the baseline you need to check the ‘Baseline will be relevant on applicable computers where this component is relevant’ box in the components tab of the edit baseline dialog. You have to click the expand icon next to the component name to see the box. The default for Fixlets is to have the box checked, and the default for tasks is to have the box unchecked.

I think that will work for you.

(imported comment written by jpeppers91)

Now it is stuck at Evaluating? We’re running version 7.09.164. I think this is an issue I read with this version.