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

What causes Spring scheduler to execute before the application and servlet starts up?

I have a simple Spring-Boot web application with some scheduling tasks: @SpringBootApplication @EnableScheduling public class Application extends SpringBootServletInitializer { @Override protected SpringApplicationBuilder configure(final…
Nikolas Charalambidis
  • 40,893
  • 16
  • 117
  • 183
2
votes
2 answers

Dealing with DateTime and Timezones with Java / Postgres

I am creating an application that let's a user create an event with a date. For example - Birthday, 25.09.2018. (The user is asked only for the date). I want to store these event objects in my Postgres DB. At the end of that date (it means at…
furry12
  • 902
  • 1
  • 14
  • 31
2
votes
1 answer

Node mail scheduler sending multiple mail behind multiple server instance hosted on cloud

I have a Node.js app running in multiple instances on google Cloud. The app has - among others - a scheduler ("node-cron": "^1.3.0") which sends a reminder mail to customers once every day. Now with multiple instances of the app, I get multiple…
2
votes
1 answer

AWS ECS starting a container is very slow after 1 day

I'm using ECS scheduled task to run my cron jobs. I have around 6 jobs running at various times. 3 of my jobs run every 2 minutes. Everything works fine for the first day when I launch a new instance in the ECS cluster. Then after a day, I see lots…
2
votes
2 answers

Service vs Scheduled Task intervals

If you have a recurring task that runs once per day, you use a Scheduled Task. If you have a recurring task that runs every 10 seconds, you use a Service. At what point do you switch between the two? Is there official guidance on this somewhere?
Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
2
votes
1 answer

Schedule firebase cloud function

Is there a simple way to schedule a cloud function to run in the future? For example I'm making a game that is turn based. If a player doesn't act in time, say a time limit of 10 seconds then the turn should go to the next player.
Peter Warbo
  • 11,136
  • 14
  • 98
  • 193
2
votes
1 answer

Designing a database with complex dependencies? (Related to scheduling)

I'm seeking to design a database to store information on some complex dependencies and could really use a point in the right direction. My googling hasn't turned up anything relevant, but perhaps you have a great web link. To provide context, it's…
ChrisG
  • 1,230
  • 4
  • 17
  • 35
2
votes
1 answer

Scheduled Task Runs .bat File with sqlcmd, but Doesn't Update the Output File

My scheduled task (on Windows Server 2008 R2) is "successfully" running each morning, but the output of sqlcmd does not get updated in the output file. The log file changes to show that the batch file ran, but the output file remains the same. When…
2
votes
2 answers

How to properly schedule while function to be interrupted and another function called

I have a script that runs pretty much 24/7. I would like it to be properly interrupted several times a day. from time import sleep def function_one(): while True: print("I'm working 24/7 and doing some important stuff here!") …
2
votes
1 answer

Run python script after every X seconds taken as input from user

I have the following python code: #!/usr/bin/python # -*- coding: utf-8 -*- import json import requests import sys import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText #Function to get the health of the…
2
votes
0 answers

How to fix "ERROR: User credentials are not allowed on the local machine." when creating a scheduled task with Administrator credentials?

Using a non-Administrator (or Administrator) cmd.exe, I enter the following command to create a scheduled task with Administrator credentials admin and P@ssw0rd: schtasks /CREATE /S %computername% /U admin /P P@ssw0rd /RU SYSTEM /SC ONLOGON /TN…
Shuzheng
  • 11,288
  • 20
  • 88
  • 186
2
votes
2 answers

PowerShell in Task Manager Shows Window

I am trying to make Task Schedule Task so it is completely invisible that a PowerShell script is running so I created a Task on my Win10 machine configured as follows: Program/Script: powershell.exe Add arguments (optional): -WindowStyle Hidden…
ChiliYago
  • 11,341
  • 23
  • 79
  • 126
2
votes
1 answer

Failure to run VBS script with task scheduler

we have this vbs script we use to update certain documents with SyncToy. This is the script as it is currently written: '-------------------------------------------------- Set oShell = CreateObject("WScript.Shell") sFilePath = chr(34) &…
McITGuy
  • 123
  • 6
2
votes
1 answer

django cerlery second task not executed

I created a celery shared_task which executes another shared_task: @shared_task(base=WorkerBase, name='analytics.worker-tenant', rate_limit='3/m') def worker_tenant(): tenants = Tenant.objects.values_list('id',…
wasp256
  • 5,943
  • 12
  • 72
  • 119
2
votes
1 answer

Custom TaskScheduler to start task by DateTime

I´m currently investigating the namespace System.Threading.Tasks and the abstract base class TaskScheduler. I also found the ParallelExtensionsExtra with some custom schedulers inherited from TaskScheduler. But i need a TaskScheduler that allows me…
Jehof
  • 34,674
  • 10
  • 123
  • 155