2

I have a simple .bat script to shutdown a kiosk style machine in our work

shutdown -h -f

this hibernates the machine and I have it running each evening as a scheduled job. However my problem comes when I turn the machine on again. The first time I press power it starts up and then immediately hibernates again, like it runs the script a second time.

the second time I press power it stays up.

Any suggestions on how I can avoid this?

5
  • Have you tried disabling hibernation, rebooting, and then re-enabling it? Does it do this EVERY time, or is it intermittent? Nov 9, 2012 at 20:53
  • It does it every time, though I'm sure it used to work without doing this, maybe an update made a change.
    – Toby Allen
    Nov 9, 2012 at 20:56
  • Does the script run on an event or it is at a certain time?
    – awright18
    Nov 9, 2012 at 23:20
  • @awright18 Runs at a certain time 8pm every evenign. I switch it on next morning between 9am - 10am
    – Toby Allen
    Nov 11, 2012 at 8:26
  • 1
    check windows event log...might give some clue Nov 21, 2012 at 2:34

2 Answers 2

1
+100

You could try to schedule the shutdown.exe program itself, rather than the script.

1
  • I'll see if that solves my problem.
    – Toby Allen
    Nov 18, 2012 at 19:18
2

First of all check the task scheduler for any other tasks that may be hibernating your PC before this task even runs and just to be sure check if anyone or anything else is hibernating the PC before the event runs ;) what I think is that this task is always being missed and it tries to run as soon as it can so it runs right after turning on your PC. *check the task history and see if it's been running on the scheduled time.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .