Questions tagged [scheduled-tasks]

A scheduled task is a computer task that is scheduled to happen at a certain time and may repeat.

Scheduled tasks are used for automation so that human presence in not required in order to execute the required task at the required time. Tasks may be scheduled to run once, or repeatedly at a specific time of a specific date.

Tasks may also be scheduled to run when specific preconditions are met. This is usually achieved by running a second scheduled task that runs sufficiently frequently, checking for preconditions, executing the desired program when these preconditions are met.

Tasks may be scheduled:

  • On *NIX: using cron. See
  • On Windows: using Windows Scheduled tasks

Lots of task automation software exists, including

7207 questions
2
votes
2 answers

Best way to stop a ScheduledThreadPoolExecutor

I am using a single ScheduledThreadPoolExecutor to manage multiple tasks and would like to add the option to stop them. I understand the difference between shutdown and shutdownNow on a regular executor service, and am interested in understanding…
iddqd
  • 1,225
  • 2
  • 16
  • 34
2
votes
3 answers

Spring boot schedule task with shedlock not running by its delay

I am using spring boot with shedlock to ensure my schedule task only run in an instance at the same time. Here is my config @Configuration @EnableScheduling @EnableSchedulerLock(mode = EnableSchedulerLock.InterceptMode.PROXY_METHOD,…
user3611168
  • 335
  • 1
  • 6
  • 27
2
votes
1 answer

Ruby win32ole - how to pass a VARIANT parameter?

I am trying to automate the Windows Task Scheduler using Ruby. I am using Ruby 1.8 under Windows Vista. The RegisterTaskDefintion method of the TaskFolder object takes two VARIANT parameters for the username and password. Any attempt to pass a…
bvanderw
  • 1,065
  • 2
  • 12
  • 20
2
votes
3 answers

Laravel Tasks - Storing when last ran

I've made CRON Job using Laravel's task scheduling. But what I need is to store somewhere when that task was last ran, Does anyone have any methods of how they store that and also, If Laravel outputs anything that can tell you when it was last…
StuBlackett
  • 3,789
  • 15
  • 68
  • 113
2
votes
1 answer

Using heaps for schedulers

On the Python official docs here, the following is mentioned regarding heaps: A nice feature of this sort is that you can efficiently insert new items while the sort is going on, provided that the inserted items are not “better” than the last…
Anmol Singh Jaggi
  • 8,376
  • 4
  • 36
  • 77
2
votes
1 answer

Scheduled Cron is running beyond the stated time in Spring Boot

I am scheduling a cron operation like this @Scheduled(cron = "0 */5 11-15 * * SUN-THU", zone = "Asia/Kolkata") public void cronner() throws ParseException { System.out.println("cron is running"); } So, this means, run the job every 5…
theanilpaudel
  • 3,348
  • 8
  • 39
  • 67
2
votes
1 answer

Is there a possibility to query all scheduled tasks returning any job with Last Run Result not (0x0) using powershell?

We (our company) are runnning several scheduled tasks on a server. Recently some of the tasks started to fail on running. We'd like to query all the scheduled jobs reporting anyone whose last run result isn't 0x0 using powershell. I've tried a lot…
2
votes
0 answers

Spring Boot @Scheduled fixedDelay stop working after some uncertain time

I am using @scheduled fixeddelay on my spring boot application for fetching record from different servers. So scheduler works fine sometime for 2 days but sometime its stop working after 3 or 4 hour. @Scheduled(fixedDelay = 5000) public void…
Nikhil Sharma
  • 593
  • 7
  • 23
2
votes
2 answers

Scheduler for ASP.NET?

I want to run some of my apps code every night in some sort of task or scheduler. Is there any build in functionality in the framework? If not, whats an easy 3rd party framework to get scheduling? Thanks
grady
  • 12,281
  • 28
  • 71
  • 110
2
votes
2 answers

Task.Run() & Task.Delay() terminated after sometime

I have created windows service in c# and in that service, I have created 4 threads and running them the background every after 10 sec. Below is the code: var ThreadSize = 4; for (int i = 0; i < ThreadSize; i++) { Task.Run(async () => { …
user2043071
  • 105
  • 1
  • 2
  • 15
2
votes
2 answers

Using .bat file and task scheduler for execution of .vbs file

My Below Code is Running properly. 1.) Can someone help me know how to use task scheduler to schedule this VBS file? 2.) Also i would like to understand writing the .bat file for the execution of this script. See the code below: Macro1 Private…
2
votes
1 answer

How to run a task DURING PARTICULAR PERIOD OF TIME with ScheduledExecutorService?

I am attempting to create a scheduled job which runs every 5 minutes from 7 AM to 22 PM everyday. For example, it should runs at 7:00, 7:05, 7:10 ... 21:55, and then it should stop at 22:00. On the next day, it runs the same schedule again and so…
theedchen
  • 1,564
  • 4
  • 10
  • 17
2
votes
1 answer

Does thread used in @Scheduled annotation released to pool before finishing execution?

I have 5 @Scheduled annotated methods and pool size of my ThreadPoolTaskScheduler is 10. Annotations of my methods are the same and like this. @Scheduled(fixedDelay = 1000, initialDelay = 10000) My question is that; When one of the scheduled…
H.Ç.T
  • 3,335
  • 1
  • 18
  • 37
2
votes
1 answer

Task scheduler console application shows just in time debugger on exception preventing program to run again

I have a console application that runs every 5 minutes in Windows Task Scheduler. The program doesn't run again if the program is still running after 5 minutes, so only one instance at a time. However, when an exception occurs, the just in time…
2
votes
0 answers

How to run artisan command schedule:run on "hostgator shared" hosting server? (Laravel 5.7)

I have been trying for 2 days to set up a laravel command on hostgator shared hosting. I contacted with their support team but they are not giving coding issue support. They said that i can set up min 15 mins cron on their shared hosting. But i…
Nur Uddin
  • 1,798
  • 1
  • 28
  • 38