New
#1
Invoke scheduled task from batch?
Is there any way to invoke a scheduled task from a script? I know the tasks can be manually invoked from the Task Scheduler's GUI so maybe there's a way to do it programmatically. Yes?
Is there any way to invoke a scheduled task from a script? I know the tasks can be manually invoked from the Task Scheduler's GUI so maybe there's a way to do it programmatically. Yes?
See here: schtasks.exe
Running a Task
The following syntax is used to immediately run a scheduled task.
syntax
schtasks /Run
[/S system [/U username [/P [password]]]]
/TN tasknam
Cool! Thank you.
You seem to be sorted but here is an example that I have in one of my own batch scripts -
Code:C:\Windows\System32\SCHTASKS.exe /run /tn "BackupRegistry"
You can get the syntax of the SCHTASKS command by entering this in a command window
Code:SCHTASKS /?
There is also guidance in
schtasks - MSDocs
schtasks - SS64
Denis