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

Concurrent Scheduled method in spring boot

I have a spring application which has two classes annotated with @Component, in each class, I have a method annotated with @Scheduled, that means I want to run those methods at the fixed interval like this : This is First Component which has a…
Mehdi Alisoltani
  • 349
  • 3
  • 13
2
votes
1 answer

windows scheduling of a power-shell script is unreliable

I'm attempting to run an automated powershell script all day, everyday. But I'm have problems getting it to run consistently and reliably, the script itself runs fine, it's getting the windows scheduler to run it consistently that's the problem. The…
ConanTheGerbil
  • 677
  • 8
  • 21
2
votes
1 answer

Retry function call n times when function throw exception in y interval of time

I wanted to retry my function call whenever it get failed in some duration of time. What is the best way do this. Is this will work fine. CompletableFuture.runAsync(() -> { for (int i = 0; i < 3; i++) { try { …
Rahul Anand
  • 165
  • 7
2
votes
1 answer

Running a python script in every 30 minutes using Crontab?

I want to run a python script for every 30 minutes. For this, I am using crontab. I am new to crontab, I read and to run a script for 30 mins I have to use a query something like this: */30 * * * * python filename.py But where exactly I have to…
Ajay Shewale
  • 159
  • 1
  • 2
  • 13
2
votes
0 answers

Lambda Scheduled Trigger not working well

I have a lambda function which I intend to execute every 20 minute. I have created a Cloudwatch scheduled rule for it. But the problem is its not executing exactly in the interval of 20 minutes. Sometimes it executes twice or thrice in a minute,…
2
votes
3 answers

Thread.sleep within @Scheduled method in Spring

I have a method that is scheduled to run each X ms. This method is launching a new method within a new thread. Nevertheless, I want to delay this method before counting again. Here is my code: @Scheduled(fixedRate = RATE_IN_MS) public void…
2
votes
5 answers

Timed scripting PHP

I am trying to figure out how to do time scripting in PHP. Basically let's say in my application, I want to do a task at timed intervals (e.g., send email notification to users everyday, do some database cleanup at certain times, etc.) How is this…
miki725
  • 27,207
  • 17
  • 105
  • 121
2
votes
1 answer

Multiple Scheduled in the same method

I'm working with @Scheduled annotations. I need to run the method in different moments, exactly each 2 and 5 seconds. How can I do it? In this moment my code is the next: @Scheduled(cron = "${cron.startdate}") public void check() { …
2
votes
0 answers

Trigger periodic celery task after an event

I'm using celery to manage tasks. Need to initiate the periodic task(which runs every 5 minutes) only if the first regular task is triggered, has to run every minute and should stop if all other regular tasks completed. Is there a way that can help…
Krish V
  • 486
  • 1
  • 5
  • 19
2
votes
1 answer

Spring boot @Scheduled fails SQL Error: 17008, SQLState: 08003

This is a similar kind of question raised in here again this looks to be a problem on @Schdeuled doesn't work with @Transaction. however, this is slightly different and might be a problem with transaction handled in my code. I'm running a…
Naveen
  • 360
  • 1
  • 8
  • 23
2
votes
3 answers

Upon creating a Maintenace Plan in SSMS 17.6, SSMS automatially restarts upon attempting to schedule the task to run

The architecture is Server 2016 with SQL 2016 Standard. SSMS has been set to run as administrator. SSMS 17.6 has been installed and re-installed. All Microsoft updates have been installed to the serer and the application. Creating a Maintenance…
Kurwin
  • 21
  • 2
2
votes
0 answers

Confused by DelayQueue

I've found DelayQueue, which is exactly what I need. In general, I agree that a ScheduledExecutorService is better, but I already have an executor and I want full control of the timing. So I have to implement the Delayed interface. This forced me to…
maaartinus
  • 44,714
  • 32
  • 161
  • 320
2
votes
2 answers

Job or Task Scheduling

I have a multitenant system (Java EE) running on Glassfish 4, which receives roughly 500 requests for a printing job at a time at a specific period in the year. Before this period, resources are enough to handle these requests, but at this period,…
jaletechs
  • 501
  • 1
  • 7
  • 19
2
votes
2 answers

Google Cloud: How to programmatically schedule recurring tasks?

I want to build a task scheduling service on the Google Cloud Platform. The tasks can be as simple as triggering a URL. Tasks can be recurring (once an hour, twice a day, every thursday, ...) and can be created and removed dynamically. Which…
Kirill Rakhman
  • 42,195
  • 18
  • 124
  • 148
2
votes
2 answers

Jenkins -run job 2 days before end of every month

Good day, I need to run job in Jenkins monthly, two days before the end of the month. The question is similar to question: run cron job on end of every month , but accepted response is not acceptable in my case. (Because modifying production code…
pinegulf
  • 1,334
  • 13
  • 32