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
2
votes
1 answer

Windows 2008 schtasks and Task Scheduler Library folders

I have an old scripts which kicks off a scheduled task: schtasks /end /tn MyTaskName /s HOSTNAME I am now trying to use it on Windows 2008, but it doesn't work. I think it's to do with the fact that the new Task Scheduler allows you to specify…
2
votes
1 answer

Windows scheduler keeps asking if I want to keep using Python.exe to open .py files

I have a script that scheduler is to run daily. Each time, it asks if I want to keep using Python.exe, even though it's already the default program for opening such files. Some advice elsewhere suggested deleting the UserChoice registry entry for…
David Metcalfe
  • 2,237
  • 1
  • 31
  • 44
2
votes
1 answer

Schedule taks with schtask.exe gives error invalid syntax in script

I want to create a scheduled task using C:\Windows\System32\schtasks.exe in a perl script. I'm using the following script: use strict; my $createScheduleTask = `SchTasks /Create /SC WEEKLY /D MON,TUE,WED,THU,FRI /TN \"updater\" /TR…
2
votes
1 answer

run matlab m file & provide parameter from windows 7 scheduler

I wish to run a matlab m file from my windows 7 scheduler. I can run a matlab m file that takes no parameters using the line below -r my_matlab_function,exit If I had a matlab function that was expecting a simple text parameter is there a way to…
mHelpMe
  • 6,336
  • 24
  • 75
  • 150
2
votes
0 answers

Why can't I create a scheduled task with PHP exec()?

I'm having headaches while trying to create scheduled tasks from a PHP script because I only get the same error that my XML code is malformed ! Here's the code I use : $tn = 'Mailing_19'; $sc = 'ONCE'; $tr = '"\'C:\Program Files\PHP\v5.4\php.exe\'…
2
votes
1 answer

Running Schtasks through powershell throwing invalid argument/option error

I'm writing up powershell scripts that runs through a bunch of scheduled tasks and attempts to delete them on Windows Server 2008. When testing the schtasks.exe command in powershell, it seems to run fine. But when I put it in my script, I get the…
2
votes
2 answers

How can I boot rails server on windows system start?

I have a rails app all set on windows 7 machine. I am able to run rails server by running .bat file (run_rails.bat) which contains the following - cd C:\Sites\myapp @call rails s -e production -p 3000 I would like to automatically start the rails…
abhishek77in
  • 1,848
  • 21
  • 41
2
votes
3 answers

screen resolution in mode "Run whether user is logged on or not", in windows task scheduler

I am using Python 2.7 and Selenium 2.39.0. to test a web application. When I run my test as a Windows (7 Ent.) scheduled task with the option "Run whether user is logged on or not", it looks like the screen resolution or window sizing changes; Some…
2
votes
1 answer

Windows scheduled task / sql server random time

I have the following situation I am working on with the majority of the issue solved. I currently the following folders and files existing on a machine. C:\foo\foo.sql C:\foo\foo.bat "foo.sql" - is a script file that has a very simple line in…
2
votes
1 answer

Windows Task Scheduler vs Windows Service for .Net application

I know variations of this topic have already been asked, but here's my situation: I have about 30 FTP interface applications. Each interface has their own requirements and configuration, but basically it downloads files from a source server –…
Raymond
  • 3,382
  • 5
  • 43
  • 67
2
votes
2 answers

Scheduling PHP CodeIgniter or any PHP applications

I'm trying to schedule my Controller Method in PHP CodeIgniter; I mean I need to call a controller method on specified times!My server is a Windows Server! So far I followed the following article…
user3000457
2
votes
1 answer

Running a Java Application on a Shared Drive from Windows Task Scheduler Client Side

First, just wanted to thank everyone in advance for helping with this, let me take you on my journey... Task: Run a Java application that is located in a folder on a file server using Windows Task Scheduler, simple enough. The caveat, is that I…
2
votes
1 answer

schtasks says "could not start" as status

I added a simple exe to scheduled tasks through C# site. The site is hosted on IIS7 (the exe just shows a message box). This was the command that I run on the C# code: schtasks /create /tn mylbat /tr "the exe path" /ru myuser /rp mypassw /sc daily…
user1976596
2
votes
1 answer

Powershell schedule task using schtasks.exe returns error success is not recognized

I am trying to schedule another powershell script using schtasks.exe using following command: $Command = cmd /c "$Env:WinDir/system32/schtasks.exe /create /s $ComputerName /tn $TaskName /tr $TaskRun /sc $Schedule /d $Days /st $StartTime /RU…
user984201
  • 111
  • 2
  • 12
2
votes
1 answer

How to create task using schtasks.exe with multiple days of month

I try to create this scheduled task using the command line: I tried: schtasks.exe /Create /tn test1 /tr notepad.exe /sc montly /m jan,feb /d 12,27 but it seems that /d can get only one parameter, for example: /d 12 How can I create the same task…
Inbal
  • 909
  • 2
  • 28
  • 46