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
2
votes
2 answers

Kleopatra No secret key

I support an application who call a CMD line to decrypt a file. The application is a .exe file that is called by the Windows Task Scheduler and is execute as the same user who have all right. The application run every week day in the evening at…
Bradford1138
  • 65
  • 1
  • 1
  • 7
2
votes
1 answer

Nomad : Unable to Run a python script

I am trying to submit the following job to my nomad server. The job basically uses a payload which is a python file from my localhost. job "agent-collector-bot" { datacenters = ["staging"] type = "batch" periodic { cron =…
Nishant Singh
  • 3,055
  • 11
  • 36
  • 74
2
votes
1 answer

different behavior between Factory.StartNew and Task.Run?

I'm trying to understand the difference between Factory.StartNew and Task.Run. I saw the equivalence in various places like here. I think I have to use Factory.StartNew() in my case as I want to plug in my own TaskScheduler. So to summ up, it seems…
chrisdot
  • 659
  • 6
  • 19
2
votes
1 answer

NLog environment layout renderer doesn't work when run as a scheduled task

I'm using NLog 4.4.12 with .NET 4.6.2 on Windows Server 2012. I've configured my app.config with the nlog section as follows:
crush
  • 16,713
  • 9
  • 59
  • 100
2
votes
1 answer

Restricting number of tasks

I have a code that fires download data routine for 2000+ companies. I have changed the download routine as a 300 seconds wait for the sake of keeping this example simple. The below is the routine for a single company which is called multiple times…
2
votes
1 answer

Entity Framework Connection via Task Scheduler connects as NTAuthority/Anonymous Logon

I have a Console Application (C#) that connects to a database and sends some emails. It runs fine when a user debug in Visual Studio, but when I copy this to a server and run as a Service Account domain\AcctNotWorking I get the error below. If I…
2
votes
1 answer

New-ScheduledTaskSettingsSet Expire task

I'm currently attempting to create a Powershell script that the overall goal will create a scheduled task on my VM which will reboot remote computers at certain times. The issue I'm currently having is trying to set the task to expire, and delete…
T. Staben
  • 53
  • 1
  • 7
2
votes
1 answer

Cursor close error in python MYSQLConnection

I'm using a python program to manipulate a MySQL database. When trying to use the windows server 2012 task scheduler it never work, the report does say that it was successful but there is not result. After using a powershell script to call the…
2
votes
1 answer

Spring - Have TaskExecutor and TaskScheduler backed by the same thread pool

I am a bean for TaskScheduler and TaskExecutor as following: @Bean public TaskScheduler taskScheduler() { ThreadPoolTaskScheduler s = new ThreadPoolTaskScheduler(); s.setThreadNamePrefix("Task-Scheduler-"); s.setPoolSize(10); …
2
votes
2 answers

NullPointerException at TaskScheduler

I have a TaskScheduler class like this : public class NotificationManger { @Autowired private TaskScheduler scheduler; private ScheduledFuture sc; public NotificationManger(WebSocketMessage webSocketMessage, String userName, Date date, Date…
2
votes
3 answers

Running PowerShell in Task Scheduler

I am using PowerShell for downloading data from email. I want to run this process by PowerShell. When I run script like this: D:\script.ps1 in powershell.exe it works fine. When I schedule it in Task Scheduler nothing happens. I tried it to Set it…
2
votes
1 answer

Keeping PowerShell window open and Task Scheduler

I have a PowerShell script that I made a task for to run everyday. Is it possible to have the PowerShell window open (and not close after running) so I can make sure it runs without errors? When I schedule with the below command, no window pops up…
Esuriency
  • 107
  • 1
  • 3
  • 12
2
votes
0 answers

How can I force run script before a user lock screen?

I ve created task on windows 7 and I tried it also on windows server 2012 R2. neither of them work. I want to create task to run script when a user lock off( Windows + L ) The script is running fine, but what I want is it runs after lock operation.I…
CompEng
  • 7,161
  • 16
  • 68
  • 122
2
votes
0 answers

How to register a process on Windows task scheduler using c++

I'm currently looking for a method to register a process on Windows task scheduler using c++(writing some code). I have searched some of possible methods on the internet but I could not find any using c/c++. Using CreateProcess to register a process…
jsh114
  • 43
  • 1
  • 4
2
votes
2 answers

Executing Assembly Location is Unknown

TL;DR Why System.Reflection.Assembly.GetExecutingAssembly().Location returns ""? The whole story: When I run my console application manually, everything goes well. When I set Task Scheduler to run my app, there is a problem: my app…
Raman Sinclair
  • 1,194
  • 17
  • 31