Topic
  • 6 replies
  • Latest Post - ‏2013-11-25T22:30:29Z by SteveHull
Michael_Knauth
Michael_Knauth
10 Posts

Pinned topic Power off device with reapply

‏2013-03-15T13:46:09Z |
Hi all,

Is it possible to run a "Power Off Computers" task that is re-run whenever it is relevant again? I've attached a screen shot of the take action window showing roughly how I'd like the action to apply.

Basically, I'd like to say that after a certain time of the day, lets say 5:10pm, if a device is still on, prompt the user and shut it down. Then, repeat the action each time it's relevant until 12:00am. Rinse and repeat every day.

The problem I have is that after the action runs the first time, it never runs again. The task is relevant for the device when it starts up, but to get it to shutdown again, a new action has to be created. I've tried creating the action without any time constraints, basically run whenever it's relevant but I still get the same result.

Can anyone maybe explain why this is experienced? Have I missed some vital logic?

Thanks,
Michael.
  • SystemAdmin
    SystemAdmin
    562 Posts

    Re: Power off device with reapply

    ‏2013-03-16T02:54:00Z  
    Any clues in the client logs?

    BTW: what happens if the user cancels the shutdown request? Will it try again later?
  • Michael_Knauth
    Michael_Knauth
    10 Posts

    Re: Power off device with reapply

    ‏2013-03-16T05:55:57Z  
    Any clues in the client logs?

    BTW: what happens if the user cancels the shutdown request? Will it try again later?
    Hi Tim,

    Unfortunately the logs don't really give much away. Prior to the action running, the logs indicate that the task is relevant.

    
    At 23:15:33 +1000 - actionsite (http:
    //iem:52311/cgi-bin/bfgather.exe/actionsite) Relevant - Power off Computers (fixlet:2167)
    


    Just before the device shuts down, there's an update.
    
    At 23:21:09 +1000 - actionsite (http:
    //iem:52311/cgi-bin/bfgather.exe/actionsite) Not Relevant - Power off Computers (fixlet:2167)
    


    After the device starts backup, there isn't anything related to the action logged.

    I haven't yet tried cancelling the power off action to see what the result is. I'll give it a go and come back.

    Michael.
  • liuhoting
    liuhoting
    8 Posts

    Re: Power off device with reapply

    ‏2013-03-30T00:04:30Z  
    Hi Tim,

    Unfortunately the logs don't really give much away. Prior to the action running, the logs indicate that the task is relevant.

    <pre class="jive-pre"> At 23:15:33 +1000 - actionsite (http: //iem:52311/cgi-bin/bfgather.exe/actionsite) Relevant - Power off Computers (fixlet:2167) </pre>

    Just before the device shuts down, there's an update.
    <pre class="jive-pre"> At 23:21:09 +1000 - actionsite (http: //iem:52311/cgi-bin/bfgather.exe/actionsite) Not Relevant - Power off Computers (fixlet:2167) </pre>

    After the device starts backup, there isn't anything related to the action logged.

    I haven't yet tried cancelling the power off action to see what the result is. I'll give it a go and come back.

    Michael.
    I think I know the answer. Does your task run correctly the first time but just never run any other time, even though it's setup as a policy action?

    I think what you have to do is make it toggle the applicability. You need to make it so that all of your relevance expressions are true the first time (in order to run the power off), false after it's immediately run (probably with some client setting or reg key with a current time parameter), then true some time afterwards (after some amount of time has passed based off that regkey we just set).

    I think policy actions without that toggle will only run once.
  • Michael_Knauth
    Michael_Knauth
    10 Posts

    Re: Power off device with reapply

    ‏2013-03-31T13:07:46Z  
    • liuhoting
    • ‏2013-03-30T00:04:30Z
    I think I know the answer. Does your task run correctly the first time but just never run any other time, even though it's setup as a policy action?

    I think what you have to do is make it toggle the applicability. You need to make it so that all of your relevance expressions are true the first time (in order to run the power off), false after it's immediately run (probably with some client setting or reg key with a current time parameter), then true some time afterwards (after some amount of time has passed based off that regkey we just set).

    I think policy actions without that toggle will only run once.
    Hi Dexter,

    Yes, the task runs correctly the first time and never again, even though it's set up as a policy.

    Being relatively new to IEM, and I'm not familiar with the concept of toggling applicability and the impact it has on policy-based tasks. I've not had to manipulate the applicability of a task before, and to a novice, just trying to read it isn't all that intuitive. I thought that for a client to just start up again would be enough to trigger the applicability.

    Are you able to provide a brief example of what I might need to do, or provide a link that may assist?

    Thanks,
    Michael.
  • AndreBordoniOliva
    AndreBordoniOliva
    8 Posts

    Re: Power off device with reapply

    ‏2013-11-25T19:43:30Z  
    Hi Dexter,

    Yes, the task runs correctly the first time and never again, even though it's set up as a policy.

    Being relatively new to IEM, and I'm not familiar with the concept of toggling applicability and the impact it has on policy-based tasks. I've not had to manipulate the applicability of a task before, and to a novice, just trying to read it isn't all that intuitive. I thought that for a client to just start up again would be enough to trigger the applicability.

    Are you able to provide a brief example of what I might need to do, or provide a link that may assist?

    Thanks,
    Michael.

    Hi,

    Please could someone help me as to the Power Management site.
     
    Power Off the Script Computers he is successful, however after Reboot the machine it does not run again by disconnecting it again and showing the task as completed.
     
    Could you hand me a script that performs the action of Power Off Computers at a certain interval, forcing the shutdown even allowing not use the same.

     

    Tks,

    André Oliva

  • SteveHull
    SteveHull
    3 Posts

    Re: Power off device with reapply

    ‏2013-11-25T22:30:29Z  

    Set the reapply with a time delay.  Instead of "whenever it becomes relevant again" choose the option "while relevant, waiting 15 minutes."  This will allow the action to toggle relevance as liuhoting suggested.  This occurs because your shutdown action is considered successful when all the steps are completed (was originally a task) rather than when the relevance evaluates to false (behavior for fixlets).  So it never "becomes relevant again" because it is always relevant.  The delay will simulate the concept of becoming relevant again and allow it to reapply.

    Regards,

    Steve