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?
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.
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?
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.
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.
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.