Jump to content
Sign in to follow this  

Timer & shutdown help?

Recommended Posts


Can somebody give me a bit of code I would use to make a script force shutdown at say 3 am on my computer?

Share this post

Link to post
Share on other sites

Shutdown ( code [, reason] )


code A combination of shutdown codes. See "remarks".

reason [optional] user shudown reason code.

Return Value

Success: Returns 1.

Failure: Returns 0 and @error is set to GetLastError().


The shutdown code is a combination of the following values:

0 = Logoff

1 = Shutdown

2 = Reboot

4 = Force

8 = Power down

16= Force if hung

32= Standby

64= Hibernate

Add the required values together. To shutdown and power down, for example, the code would be 9 (shutdown + power down = 1 + 8 = 9).

Standby or Hibernate are ignored if other codes are set.

Also look at @HOUR



My Android cat and mouse game

We're gonna need another Timmy!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.