How can I get Steam to download games during off hours?

My bandwidth provider has a window at night where my data isn't counted against my cap. How can I get Steam to download during that window? I know I can set the auto-updater for a specific time, but I want it to pull the game files at that time, too.


Solution 1:

There is an easy way to achieve this.

Step 1

Start installing all those games you want to download during the night. The initial download of the file list is normally just a few kilobytes. Do not pause any downloads. Then exit Steam.

The Shell Script

Create a text file on your desktop or any other folder and name it steam_download.cmd. Make sure there is no trailing .txt, the icon should change to a window with cogs instead of the text file icon when you renamed it. Then paste the following text into it:

start "steam://"
shutdown /f /s /t 3600 

This first command will launch Steam. It will then automatically continue downloading your games. We will get to the other command after the next step.

The Task

Assuming Windows 7 or later, go to the Start Menu, type "Task" and launch the Task Scheduler. Right-click on the left pane on "Task Scheduler Library" and create a Task.

Name it how you like it, e.g. "Steam Downloads Task".

Then click on the "Triggers" Tab. There click "new". Then choose the time when it should begin. If your ISP's free time starts at midnight, choose 0:05 for example. Set it to one time, daily or weekly, however you want it. In your case, you would probably set it to "one time" and adjust to the date whenever you need it again. Remember to set it to the next day.

Next, click on the actions tab and select "New". Make sure "Start a program" is selected and then click "Browse" and navigate to the script you just made.

Click on the "Conditions" Tab and make sure "Wake Computer to run this Task" is set. It is important to leave your computer on and not shut it down when you go to bed and want Steam to download while you are in dreamland with Xena.

Adjusting the script

Remember the script we just made? Go back to it.

shutdown /f /s /t 3600 

This line will force your computer to shut down. We only want it to shut down after we are done downloading though. Now, there is no way we can know beforehand when it will be done. However, I suggest to set it to the exact time your ISP has unrated hours. So assuming the script starts at midnight and the hours would go until 6 o'clock, you would need to change 3600 to 21600, which is 6 hours. The time value is in seconds, so 3600 is 1 hour.

This would assure that all downloads are stopped. However, if you want to keep your computer on and only want to kill Steam to make sure it stops downloading, there is another way:

 start steam://
 timeout /t 3600 /nobreak
 TASKKILL /f /im "steam.exe"

This would launch Steam and kill it after 1 hour. The time parameter is in seconds here too.

Conclusion

(Ab)Using the Task System and Steam's convenience of continuing downloads after launching it, you can handle this with some effort.

Here is an overview of possible scripts to toy with:

Launch Steam, shutdown after 1 hour, time in seconds

start "steam://"
shutdown /f /s /t 3600 

Launch Steam, hibernate after 1 hour, time in seconds

start "steam://"
shutdown /f /h /t 3600 

Launch Steam, kill Steam after 1 hour, leave computer on, time in seconds

 start steam://
 timeout /t 3600 /nobreak
 TASKKILL /f /im "steam.exe"

Sidenote:

If you have Windows Vista, use the last solution since the shutdown command seems to be limited to 10 Minutes. Props to MrLemon for the information.

Solution 2:

There is a work-around to turn new game downloads into scheduled updates:

1- configure scheduled updates and set it as the default update method

2- initiate downloads for your new games

3- pause your downloads

4- secret sauce: restart the Steam client to clear the paused download status

5- your new games should now be queued as scheduled updates with "Update Required" status (found on Steam forum)