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
0 answers

How to restore tasks of ScheduledExecutorService after restart spring boot?

I wanted to ask how to restore tasks of ScheduledExecutorService after restart spring boot. I'm setting a few tasks which should be called once a day and how can I restore them after reset of spring boot app? is it possible if I have many of them?…
2
votes
1 answer

Some issue with heroku scheduler

I work with add-on heroku scheduler Advanced Scheduler. I created a php script which works in CLI mode and is launched like php /app/crons/pushnotifications.php. In my Heroku plan I can run the script every 10 minutes, and in order to run it every…
aid78
  • 190
  • 7
2
votes
2 answers

How to create a scheduler application in php

I want to develop a scheduler in php I know there is cronjob already present in php but I want to develop like java but I don't want to use sleep(1) method. I know how to develop it in JAVA. JAVA code is given below. scheduler =…
2
votes
1 answer

Run a Python script once per day

I have a small Python utility script that I would like to run once a day, overnight when the computer is in a quiescent mode (hibernate, sleeping, whatever works). I have tried using Task Scheduler on Win10, but it just doesn't work- see all the…
C382
  • 87
  • 1
  • 5
2
votes
2 answers

How to configure "If the task is already running, then the following rule applies" in Windows Task Scheduler using PowerShell script?

I am trying to achieve the following settings (select "If the task is already running, then the following rule applies") through PowerShell script but unable to get appropriate settings to configure that. I am using the following code to configure…
Dhar Dibya
  • 47
  • 1
  • 10
2
votes
1 answer

Spring Boot:How can we implement multiple @Scheduled tasks with each having its own thread pool?

I want to implement multiple @Scheduled(with fixed delay) tasks, each with their own thread pools. @Scheduled(fixedDelayString = "30000") public void createOrderSchedule() { //create 10 orders concurrently; wait for all to be finished …
2
votes
2 answers

How to schedule a task to run every minute between two time intervals for specific days?

I am using python 3.6 & schedule module and needs to schedule a task to run every minute between two time intervals for some specific days of week. For instance, say task is meant to be scheduled for every minute for 2.5 hours time interval of 11:00…
Hamza
  • 5,373
  • 3
  • 28
  • 43
2
votes
1 answer

How to test @Scheduled annotated methods

I was searching a long time for options to test @Scheduled annotated methods in Spring Boot Java application. There are several ways to trigger such a job (e.g. fixedRate, cron etc.). Is there a general approach to test such methods? In my project I…
steeveam
  • 21
  • 2
2
votes
2 answers

Run Laravel Schedule with delay

I have a lot of Laravel jobs that run everyMinute, But I don't want all of them to run at the same time, Is it possible to make some of them run everyMinute but with 1-2 seconds delay? Something like this: Job 1 > Every Minute at 00 seconds Job 2 >…
J. Doe
  • 812
  • 1
  • 15
  • 33
2
votes
1 answer

How do I figure out what's wrong with Register-ScheduledTask parameter sets?

I have a (unfortunately) very, very long PowerShell script that builds out an entire server instance. That is: all files are installed, all system settings are added, and so on. The last thing it does is add a scheduled task to run the "master"…
Bret Levy
  • 27
  • 1
  • 4
2
votes
0 answers

task scheduler run .exe problem (.exe contains processing java code)

I have Java code. I wrote it using Processing IDE, then used export application to get an .exe from this code. Now I added this .exe to the Task Scheduler to run it in special time. The problem is: the Task Scheduler cannot run this .exe. When I…
Hasan_Naser
  • 204
  • 3
  • 13
2
votes
2 answers

Flask-SQLALchemy update record automatically after specific time

I have a db models like this: class Payment(db.Model): id = db.Column(db.Integer(), primary_key=True) user_id = db.Column(db.Integer(), db.ForeignKey('user.id')) ticket_status = db.Column(db.Enum(TicketStatus, name='ticket_status',…
Tri
  • 2,722
  • 5
  • 36
  • 65
2
votes
0 answers

Python 3 Better way to schedule a function to run when a certain time is reached?

I am trying to find the best way to schedule a function to execute in my python program. Currently I have the following code; which works but I am curious if there is a better way. from datetime import datetime start_time = datetime(2019, 7, 26,…
2
votes
1 answer

How to specify PST time zone in @Scheduled annotation that should trigger every hour between 7AM PST to 6 PM PST?

My Java Web application has a Cron Job Scheduler which should trigger every hour starting from 7AM PST to 6PM PST. I am not getting how to specify PST time zone using zone parameter inside @Scheduled annotation. Kindly help @Component public…
Karthik sa
  • 49
  • 7
2
votes
1 answer

Ways to schedule long running laravel tasks without root and privileged user

Me and my team are using a shared hosting service with a limited linux container (without root and privileged user) and we need to develop a new feature that involves long running tasks (> 600ms). We thought of two possible solutions: Breaking…