Why you should use Windows Task Scheduler with Dreambot
If your computer or server has an unexpected restart you can set up Windows Task Scheduler to launch Dreambot again on system startup to minimize loss of botting time. The same goes for when Runescape has an update. Since Runescape updates on the same day / time almost every week you can have your bots restart after the system update automatically without having to wake up early and do it yourself.
NOTE: For this to launch your clients with your desired script you will need QuickStart set up.
In this tutorial I will cover:
Updating the client
Closing all clients
Launching the clients with quickstart
Search and launch the Task Scheduler application
Expand the Task Scheduler Library folder then right click -> New Folder... -> Give any name -> Open the newly created folder
Updating Dreambot / How to create a task
Under actions on the right hand side click Create Task...
The Create Task window should now be up. Under the general tab you will give the task a name and description. You can also set up the configuration for the Windows system you are on (this doesn't really matter too much, but I still change it anyways)
Next we will go to the Triggers tab. This will tell Task Scheduler on when to launch the task. Since I leave my clients up all week until the system update I will set this to run weekly on Tuesday at 7:30am EST (this is currently the date / time Runescape updates)
To do this:
Select Weekly -> Set the time for 7:30 AM -> Check Tuesday -> Press OK
Once you have the trigger set up you can now move on to the Actions tab. You will use the actions tab to launch the Dreambot Launcher. If Dreambot has had an update it will download after this executes.
To launch the launcher:
Locate your DBLauncher.jar file -> Open -> Press OK
Once you're back to the Create Task window hit OK again. Your client will now launch every Tuesday at 7:30 AM.
Closing Dreambot Launcher/Clients
Now that the client is updated you can close all of your previous clients / launchers. First we will need to make a batch file that will kill all of the clients.
Open up notepad or any other text editor and copy and paste these commands:
taskkill /im java.exe /f
taskkill /im javaw.exe /f
Save the file as CloseDreambot.bat
Now the process is going to be exactly the same as before when we updated the client. For the trigger I have this execute one minute after updating my client, and for the action you will just select your batch file that you just created.
Launching the clients with QuickStart
Again, the process is pretty much the same as before, but there are some minor things you will have to do to get this running properly.
I have a bat file that launches all of my quick start clients in 5 second intervals it looks like this:
START /B AccountONE.bat
timeout /t 5
START /B AccountTWO.bat
timeout /t 5
START /B AccountTHREE.bat
timeout /t 5
BE SURE TO INCLUDE THE cd COMMAND (iirc I needed this to get it to work with Task Scheduler)
On the trigger command I have it set to execute one minute after I closed the Dreambot clients and I have it set to execute on startup (more on this in a minute) , and for the action you will select you batch file that you use to launch all of your quick start clients. You're pretty much done now unless you want it to launch your clients on system start up as well.
To setup launching your clients on startup:
You will need to run the windows autologin script or have a machine without a password. I know this isn't very good security practice, but if you try to execute a task with the button "Run whether user is logged on or not" it will run on the system and you will not be able to see your clients after they launched. You could have a task that locks your system after you are done running commands.
Make sure you are running the task when the user is logged on (under the general tab in the task window)
Go to the Triggers tab -> Click New...
Click the dropdown box and select "At startup"
Then you can delay the task for however long you want. I have it delayed for one minute after startup
Click OK and you should be all set.
Things to consider
Unfortunately, with some game updates some widgets change or some of the hooks get broken. If a widget changes there's a chance that your script could run for a few hours without you noticing that its been sitting idle or not interacting with things correctly. Even though this is rare, you should have something in your scripts to prevent this. I personally have an idle timer in all of my scripts so after x minutes of idle time it will stop the script and notify me. You could also filter the widgets by text which should work even if the widgets update. It's not too much of a hassle if the hooks get outdated, in this case you will just need to wait until the developers update the client and manually launch it yourself.