Questions tagged [windows-task-scheduler]

Use for questions about programmatic modification of task scheduling on any version of the Windows OS.

The MS Windows system scheduler component manages the execution time (time slices) that competing processes & threads are given on available processor cores.

Tag usage

The task is for questions about programmatic modification of task scheduling on any version of the Windows OS. You should also tag questions with their specific Windows version, where relevant.

Related tags

References

Microsoft documentation is the primary source for documentation about Windows Scheduling. You may refer the following topics for more information:

845 questions
13
votes
1 answer

Start a Java process at low priority using Runtime.exec / ProcessBuilder.start?

I'm trying to start an external process via Java using the ProcessBuilder class, and that much works. Currently running using the command: new ProcessBuilder("java", "-jar", jarfile, args); What I would like to do is just this, but to start the…
Andrew
  • 617
  • 2
  • 6
  • 19
11
votes
2 answers

Filter list of scheduled tasks by taskname

running the cmd command schtasks /query /fo LIST Gives me a list of all scheduled tasks running on my system. Example: HostName: CHESTNUT105B TaskName: Calculator Next Run Time: 12:00:00, 10/28/2010 Status: Running HostName: …
Ayush
  • 41,754
  • 51
  • 164
  • 239
10
votes
2 answers

How to restrict windows tasks to weekdays only?

I have a task that triggers on "user session logon". I now want to restrict that task to fire only on weekdays, and being ignored on the weekend. Is that possible? Sidenote: I cannot use the trigger on schedule as I do not want to run the task…
membersound
  • 81,582
  • 193
  • 585
  • 1,120
10
votes
4 answers

Where can I find the Windows Task Scheduler exit codes list?

All I have found about the Windows Task Scheduler results are short details about just a few codes. Does anybody knows about a complete list? For example, I have not been able to locate anything about the error code 0xFF. EDIT:For example, if I add…
9
votes
2 answers

How to execute a scheduled task with "schtasks" without opening a new command line window?

I have a batch file that creates a scheduled task using schtasks like this: schtasks /create /tn my_task_name /tr "...\my_path\my_task.bat" /sc daily /st 10:00:00 /s…
Misha Moroshko
  • 166,356
  • 226
  • 505
  • 746
9
votes
1 answer

Windows Task Scheduler: Task stopping due to timeout reached error

I've scheduled a task to run every 30 mins in task Scheduler in Windows Server 2008. And in the task settings,the option "stop the task if it runs longer than" is set to '1 day'. I have noticed that sometimes the task is being terminated after it…
Java Bean
  • 404
  • 1
  • 5
  • 12
9
votes
4 answers

Schtasks Permission Error on Administrative User?

I know this has been asked in different ways a few times, but nothing has helped me for my specific case. This is all done on a Windows 7 Home Premium desktop computer through Windows Command Line. I was attempting to create a simple batch…
Rezkin
  • 441
  • 1
  • 6
  • 17
8
votes
2 answers

Powershell script to schedule daily task error

I have a very simple power shell script that will register console applications as daily scheduled tasks. $TaskCommand = Read-Host 'Enter the path to the console application' $TaskName = "TaskName" $TaskStartTime = "10PM" $TaskArg = "-WindowStyle…
jjharrison
  • 841
  • 4
  • 19
  • 33
8
votes
3 answers

scheduled tasks don't show up in Get-ScheduledTask result

I have defined some scheduled task using Windows Task Scheduler GUI under "" [default] path but when i run Get-ScheduledTask in powershell, it does not return them. why? I have tried with Get-ScheduledTask -TaskName "MyTaskName" with one of my task…
8
votes
1 answer

IF exist for scheduled task

I have created a batch file to check if scheduled task exists and if they don't create them, however, my if exist rule seem to always hit true even though the jobs are not there. Any ideas? ::Check Rule IF EXIST SchTasks /QUERY /TN "Cache Task…
Tom
  • 12,928
  • 2
  • 15
  • 31
8
votes
2 answers

How to send a Yes parameter to overwrite a schedule from command line in vb.net

I'm developing and application and I'm creating scheduled tasks from command line using vb.net. When I'm trying to create an existing schedule the command line window come asking if we want to overwrite the existing schedule tasks, My question…
Javier Salas
  • 1,064
  • 5
  • 15
  • 38
8
votes
2 answers

schtasks /create (Have a task that runs every day and repeats every hour

Sorry if this or similar has been asked, and I hope I'm missing something stupid and this is easy, but. How do I make a task using the schtasks /create command that will start say every day at 7 and repeat every hour either indefinitely or for the…
Ivan S
  • 1,051
  • 6
  • 14
  • 26
7
votes
3 answers

Schedule a script developed in Anaconda via Windows Task Scheduler

I'm trying to use Windows Task Scheduler to run a script in python and write a csv file. I've always used Anaconda, so I don't understand how Python's command line works. If I run this on Spyder, import pandas as pd import datetime now_is =…
Camila Burne
  • 156
  • 1
  • 1
  • 8
7
votes
1 answer

What's the difference between Windows Task Scheduler, Hangfire, and Quartz.net?

I always need to develop some periodically job. How should I choose between Windows Task Scheduler or Hangfire? What's the difference between Windows Task Scheduler and Hangfire (or Quartz.net)?
Farwell_Liu
  • 645
  • 1
  • 7
  • 17
6
votes
1 answer

How to escape schtasks /tr arguments

I need to schedule a PowerShell task like following: powershell.exe -file ..\Execute\execute.ps1 And I have tried assigning it to an argument $Argument then pass it to schtasks like following: $Argument = "powershell.exe -file…
1
2
3
56 57