Does anyone know how to set a scheduled task to run in background using Windows Task Scheduler?
There doesn't seem to be any option to do this.
As noted by Mattias Nordqvist in the comments below, you can also select the radio button option "Run whether user is logged on or not". When saving the task, you will be prompted once for the user password. bambams noted that this wouldn't grant System permissions to the process, and also seems to hide the command window.
It's not an obvious solution, but to make a Scheduled Task run in the background, change the User running the task to "SYSTEM", and nothing will appear on your screen.
why does the "Hidden" checkbox, which sounds like it should do this, not do anything
@JoshuaFrank, that checkbox does not run the program hidden, it hides the task in the Task Scheduler. You can toggle showing hidden tasks on and off via View→Show Hidden Tasks
. This is (probably) a way to reduce clutter in the scheduler. –
Spectacles robocopy
to my OneDrive online drive and it wouldn't work. Running a SYSTEM
did. Since it's just a simple copy, I'm okay with that (I think). –
Observer Assuming the application you are attempting to run in the background is CLI based, you can try calling the scheduled jobs using Hidden Start
Also see: http://www.howtogeek.com/howto/windows/hide-flashing-command-line-and-batch-file-windows-on-startup/
start /b
–
Flatfooted start
is that its a command not a program, so you cannot use it in Task Scheduler. –
Colemancolemanite cmd.exe /c start
does the trick for commands which are not programs. –
Gower cmd
process and the start
command, so you still end up with a console window which at the very least flashes for a moment. It just defers the problem (and adds an extra and unnecessary level of abstraction to the issue. –
Spectacles cmd.exe /C <name_of_non-exe_to_run>
, such as CMD file, does the trick for commands which are not programs. Task Scheduler moves /C <name_of_non-exe_to_run>
to the arguments for cmd.exe. –
Valtin © 2022 - 2024 — McMap. All rights reserved.