4 Boring Tasks You Can Automate With the Windows Task Scheduler
How many Windows tasks do you carry out again and again? Wouldn’t it be great if these could be automated? You’re in luck, because that’s precisely what the Task Scheduler will do.
While the basic functionality of the Task Scheduler is to open programs at a specified point, it’s actually capable of other functionality like sending emails, sending the computer to sleep, or deleting all files in a folder automatically. Let us show you how.
The Basic ‘How To’ Of Task Scheduler
Firstly, do a system search for schedule tasks or task scheduler and select the result to launch the utility. Even if you’ve never used the scheduler before you’ll probably notice that you already have active tasks. This is because some system functions and installed programs will require things to be run at certain times. A common example of this are programs that scan automatically for updates.
At a basic level. Task Scheduler can start a program, send an email, and display a message, so let’s take a look at how to set those up. Once Task Scheduler is open, select Create Basic Task… from the right-hand navigation. This will open a new window that will require you to give your task a Name and Description. Once done, click the Next button.
The next screen allows you to specify when you want the task to start. While you can select standard time intervals like Daily or Weekly, you can also choose to run the task when your computer starts or when you log on. Click the Next button once you’ve selected. You might be asked to specify further the time intervals, depending on your selection. Click Next again when you’ve done that.
Now you can choose whether to launch a program, send an email or show a message. Again, the next screen will depend on what you select. Fill in the required information, click Next and then confirm your task by clicking Finish. Excellent! You’ve now scheduled a task. Now let’s take a look at situations this could come in handy.
Boring Tasks To Automate
Your time is valuable and there’s no point wasting it with repetitive tasks. Now that you know how to go about creating tasks, here’s a run-down of some situations where automation would be beneficial.
Launching Programs When You Log On
The chances are that you open the same programs every time you log on to your computer – perhaps your web browser, emails and chat client. There’s no need to bother loading these up in turn when you can automate the process.
Follow the steps above to begin setting up your task. On the Trigger screen you should select When I log on and then click Next. On the Action screen click Start a program and then click Browse…. Navigate to where the program you want is (for example, Firefox is stored by default in C:\Program Files\Mozilla Firefox\firefox.exe) and select it.
Finally, click Next again and then Finish. Repeat this process as many times as you like until you’ve got a task for every program you want to automatically launch when you log on.
For some more ideas on this, be sure to check out our guide on how to run programs automatically .
Delete All Files In A Folder
Do you have a folder that you’re always having to clear out? A common example is probably the Downloads folder, which can soon become bulky with things you perhaps only needed temporarily. We can create a task that’ll automatically delete everything within the folder at a specific interval.
First of all, launch Notepad and copy and paste the following into it:
REM Remove files older than 7 days
forfiles /p “C:\Users\NAME\Downloads” /s /m *.* /c “cmd /c Del @path” /d -7
There are a few things you’ll need to edit within this. Firstly, alter the folder path (that’s everything from C:\ to Downloads) to the one you want cleared out. If you want to keep it as your Downloads folder, just switch out NAME with your account name. Secondly, the 7 refers to the number of days that should pass before this action occurs again. The example above is set for a week, but feel free to change it to something like 30 if you want it every month.
Now go to File and Save As… and name your file FolderClearup.bat. Actually, you can call it anything you want providing you have .bat on the end (it stands for batch). Once saved, open the file to make sure it works – you’ll know it has if the folder specified has been emptied.
Then load up Task Scheduler and follow the steps outlined above to create your task. Set the Trigger to be whatever time period you’ve specified in the batch file (so weekly for the example above) and for Action you need to select Start a Program. Then Browse… to your batch file, select it and navigate to the end of the task creation.
Thank you to How-To Geek for enlightening us on this task! Be sure to also check out our guides on how to automatically keep Windows clean of obsolete files using Task Scheduler and Disk Cleanup and how to keep your downloads folder tidy .
Send Automated Emails With Attachments
Is there an email that you always have to send out every week – perhaps a report to the boss? With Task Scheduler and a nifty utility called SendEmail [Broken URL Removed] you can fire off emails at any interval you like, with attachments automatically included, too.
We’ve got an excellent guide that details how to send automated emails with attachments. If you’re already familiar with SendEmail then all you have to do is create your basic task in the scheduler, as outlined above, and then select SendEmail as your program on Action. In the text box called Add arguments (optional), input something like following:
-f firstname.lastname@example.org -u Monday Status Updates -m Here’s the analytics data for this week! -a Analytics_Channel1.csv -t email@example.com -s smtp.gmail.com:587 -xu firstname.lastname@example.org -xp xxxxxxx -o tls=yes
This example comes from our guide linked above, but should be edited depending on your SendEmail settings (switching out things like the emails, servers and message content).
Don’t worry if you’ve never used SendEmail before – check out the guide linked above and you’ll be able to follow all the steps to get it set up in no time.
Sleep And Wake Your System
Rundll32.exe Powrprof.dll,SetSuspendState Sleep
Go to File, then Save As… and name the file Sleep.bat (again, anything is fine providing the file extension is on the end).
Set this up in the Task Scheduler as outlined above. Set the Trigger to whatever time you want your system awoken. On the Action screen you should select Start a Program. Then Browse… to your batch file, select it and finish the task creation.
To wake up the system you’ll need to select Create Task… (rather than Basic Task) within the Task Scheduler. On the General tab give your task a Name and Description.
Switch to the Triggers tab, click New… and then input the times that you want your computer to wake up into the window that appears. Click OK when you’ve done that.
Switch to the Actions tab, select New… and then choose Display a message for the Action. Input anything you like here – it’s what will show when your computer wakes. Click OK when done.
Finally, switch to the Conditions tab and make sure that Wake the computer to run this task is ticked. You’re good to go, so click OK. Now your computer will sleep and wake when you’ve told it to.
Thank you to groovyPost for the great tip on this one!
Alternatives Are Available
Windows comes with Task Scheduler built-in, but there are other programs you can use to automatically perform tasks . You might find these more reliable or the user interface more intuitive.
Don’t be afraid to play around with the Task Scheduler and see what works for you. After all, tasks can always be removed. You can even use it in conjunction with other tricks, like making Windows Update less annoying . Once you’ve got the knack you’ll be setting up all sorts of tasks and saving yourself a bunch of time.
Do you currently use Task Scheduler for anything in particular? Is there a great idea that we’re missing from our list?