Create Windows scheduled task (for the NppUpdater script)
The previous NppUpdater script doesn’t do anything without it being scheduled in the task scheduler.
So I thought I also release a script to you, which does just that. If you add the code in this script to the NppUpdater script, it’ll also create the scheduled task if it doesn’t exist. Of course the script can also be used for scheduling other things.
The task is created with the following parameters:
- The task’s created in a subfolder called “SysAdmins”
- The task’s name is “NppUpdater”.
- The task will start the NppUpdater.cmd file.
- The task runs daily at 6 am, with a random start delay of 15 minutes
- The task its start-in path is set to the path the script started from when it rain
- The task will run with highest privileges as the account that ran it (which needs to be a member of the administrators group)
- The task requires a logged on user (if you don’t prefer this: just change the script)
If you don’t want the text in your log file about the task already existing, change the line in the bottom from
The script can be found here: Create-ScheduledTask.ps1