Action with restart in the middle

(imported topic written by Shlomi91)

Hi,

how can i write an action which has a restart in the middle?

i need to remove an application, restart the computer and install an updated application.

if i write the action script with action 1 ==> restart ==> action 2, will it work? any suggestions?

thanks,

Shlomi

(imported comment written by BenKus)

Hey Shlomi,

The easiest way is to add the restart Fixlet to a baseline as the middle action (you can create a custom Task to do the restart if you want to ensure a restart occurs).

Ben

for baselines, when computer restarts, does client evaluate the first fixlet again ?
what happens if first fixlet of baseline is relevant again right after restart ?

It’s my understanding that the client “remembers” where it was in the Baseline action and will pickup with the next component.

Testing is obviously advised here.

what happens if the computer restarts while a single action is being executed ?
does it remember the last point where it was ?

I will test these cases and add results here ?

If an endpoint reboots in the middle of an action it will “Fail” that Action.

1 Like

Rebooting in the middle of a baseline isn’t recommended. It slows down baseline execution significantly.

It is much better to reboot as the post action to a baseline, and then have a 2nd baseline continue from there.

If you want to reboot in an action, you can have the last line of actionscript use the restart actionscript command.

This is not the best document, but it references the restart command in the “Other” section: https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/Tivoli%20Endpoint%20Manager/page/BigFix%20Actions


###Related:

i need do the followings in the same action, or same baseline

  1. do something
  2. reboot client system
  3. do another things

I created a task which has a reboot statement for post-action.
and I also created a second task.
I put these tasks in a baseline in order.
when I take action for baseline, it executed both tasks and then reboot finally (not after the first action)

do you have any other idea about how to reboot client between two tasks?

have the last thing before the reboot use the actionscript action requires restart and then set something on the system, like create an empty file with a particular name.

Have the things that must happen after the reboot have relevance to check for the existence of that file and not pending restart.

If this is a windows system, then I would recommend writing the file to the Windows Temp folder or the BES Client Log folder.

Writing the file to the system is not needed if you can write relevance to detect the change that is being made and use that relevance to prevent the 2nd item from running until that change is made.

Can you provide some details about the first set of things that need to happen before the reboot are?

1 Like

Thanks very much James.

when I added the relevance of “not pending restart” into second task of baseline, it worked.

initially, the second task was "Not Relevant"
after reboot, it was Relevant and client went on to execute baseline.

1 Like