Questions tagged [taskscheduler]

Task Scheduler is the common name for a set of tools and services that provide scheduled execution of executables and scripts on the Windows operating system. Use taskschedular tag in conjunction with powershell, winapi, windows-task-scheduler tags when Task Scheduler related.

The Task Scheduler helps scheduling automated tasks that perform actions at a specific time or when a certain event occurs. It maintains a library of all scheduled tasks, providing an organized view of the tasks and a convenient point of access for managing them. There can be run, disabled, modified, and deleted tasks from within the library. The Task Scheduler user interface (UI) is a Microsoft Management Console (mmc) snap-in since Windows Vista and Windows Server 2008.

Useful links

492 questions
6
votes
5 answers

Window Server 2016 Datacenter is unable to automatically trigger the action

Good afternoon! Recently I have created a Window Server 2016 Datacenter. One of my tasks is to run my own application on a schedule(every 5 minutes). In order to test whether "task scheduler" works properly a try to launch calculator and set…
6
votes
1 answer

Running visible applications, using Java ProcessBuilder, from a process started by TaskScheduler

It's well known that when starting tasks via TaskScheduler in recent versions of Windows, that if the task is "run whether user is logged on or not", then the task will not run interactively - i.e. it will not start a UI. For reference, this is…
amaidment
  • 6,942
  • 5
  • 52
  • 88
6
votes
1 answer

Update a Scheduled Task Action Argument using Powershell 4.0

Does anyone know how to update the Arguments of a Scheduled Task Action using PowerShell? Here is how I have been told to update the Action, thanks to @Richard 's answer in another question. $Action = New-ScheduledTaskAction -Execute…
Gareth Doherty
  • 187
  • 1
  • 3
  • 15
6
votes
1 answer

Task scheduler can't show GUI of the application after logout and login (run whether user is logged on or not)

I have a GUI application, and I hope it auto run after reboot/logout windows computer. Here is how I use windows task scheduler: first run a command to create a task: c:\Windows\System32\schtasks.exe /Create /TN taskname /XML taskname.xml /RU…
Ng2-Fun
  • 3,307
  • 9
  • 27
  • 47
6
votes
2 answers

Task Scheduler Managed Wrapper does not show all tasks

I have created a simple Windows Forms Application that displays the names and folders of all scheduled tasks on the machine. I'm using the Task Scheduler Managed Wrapper (Microsoft.Win32.TaskScheduler) and below is the code that gets the names and…
jahrentorp
  • 155
  • 1
  • 11
5
votes
1 answer

schtasks automatically enables "Stop the task if it runs longer than 3 days"

I use the batch script to create a scheduled task: schtasks /Create /F /RL highest /SC onlogon /TR "C:\MyFile.exe" /TN "MyDescription" It perfectly runs my application on every user logon. However, it automatically enables "Stop the task if it runs…
Xel Naga
  • 826
  • 11
  • 28
5
votes
2 answers

Task scheduler-run on event for a specific task only

I have a powershell script which triggers an email and I have saved this as EmailScript.PS1 (no issues with the script,it runs just fine). I am planning to schedule this script whenever an event is logged in ,example: Event ID:111 …
anky
  • 74,114
  • 11
  • 41
  • 70
5
votes
2 answers

Task Scheduler arguments with quotes not working

Sample run.bat file echo "Test" echo %1 echo %2 set /p DUMMY=Hit ENTER to continue... So this bat file will print the first two arguments that are given to them. The arguments may or may not contain spaces. For that I have escaped them with Double…
Madhan
  • 5,750
  • 4
  • 28
  • 61
5
votes
3 answers

date + time to timestamp in angular2

Am trying to learn angular2+ and i want to make a GoogleCalendar's like scheduler app. After many research, i decided to use PrimeNG. The output format of the calendar is 2016-01-16T16:00:00 that's seems great and complete. But the api i want to…
moonshine
  • 799
  • 2
  • 11
  • 24
5
votes
1 answer

How to set “run only if logged in” and “run as” with TaskScheduler in C#?

I am trying to use the c# Task Scheduler Managed Wrapper to programmatically generate scheduled tasks on a windows system. I can generate tasks, but i cannot get it to run only when the account is logged on: I have been looking around and I found…
Roger Hill
  • 3,677
  • 1
  • 34
  • 38
5
votes
1 answer

Laravel 5.2 Cron not working on centos

When I am trying to run Task Schedular on localhost(php version : PHP 5.6.4-4ubuntu6.4 (cli)) it is working perfectly. crontab * * * * * php /home/aishatest/public_html/Aisha/Aisha/artisan schedule:run >> /dev/null…
Rohit shah
  • 833
  • 4
  • 15
5
votes
0 answers

Performance difference between ThreadPool.QueueUserWorkItem and Task.Factory.StartNew

I have a code base using ThreadPool.QueueUserWorkItem in several places. I thought it would be a good idea to switch from using ThreadPool.QueueUserWorkItem to using Task.Factory.StartNew with TaskScheduler.Default as a scheduler. After upgrading, I…
4
votes
0 answers

C# - Why my TaskScheduler is replaced by the default one after certain await calls?

I'm trying to set a custom TaskScheduler, but it's not working for nested async methods. The scheduler changes mysteriously to the default. Here's the code: using System; using System.Collections.Generic; using System.Diagnostics; using…
fernacolo
  • 7,012
  • 5
  • 40
  • 61
4
votes
1 answer

Run perl Plackup script from Scheduled Task

How can I call a script with that preceding argument before the script path using Task Scheduler or a batch file? plackup E:\Mojolicious_server.pl So I have multiple Mojolicious applications. I have bundled them all into a psgi server using…
gregnnylf94
  • 370
  • 3
  • 16
4
votes
1 answer

Trigger task scheduler Job from powershell

I want to create a job that runs between the hours of 6 AM and 9 PM Monday through Friday and triggers in an interval of 15 min and the job should terminate if it runs longer than 10 minutes. I have tried the below code: $action =…
Venkatakrishnan
  • 776
  • 11
  • 26
1
2
3
32 33