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

6410 questions
544
votes
24 answers

Set up a scheduled job?

I've been working on a web app using Django, and I'm curious if there is a way to schedule a job to run periodically. Basically I just want to run through the database and make some calculations/updates on an automatic, regular basis, but I can't…
TM.
  • 94,986
  • 30
  • 119
  • 125
401
votes
9 answers

How do I get a Cron like scheduler in Python?

I'm looking for a library in Python which will provide at and cron like functionality. I'd quite like have a pure Python solution, rather than relying on tools installed on the box; this way I run on machines with no cron. For those unfamiliar with…
jamesh
  • 18,935
  • 13
  • 54
  • 96
363
votes
20 answers

Running a cron every 30 seconds

Ok so I have a cron that I need to run every 30 seconds. Here is what I have: */30 * * * * /bin/bash -l -c 'cd /srv/last_song/releases/20120308133159 && script/rails runner -e production '\''Song.insert_latest'\''' It runs, but is this running…
Matt Elhotiby
  • 39,076
  • 79
  • 210
  • 312
319
votes
8 answers

Run a task every x-minutes with Windows Task Scheduler

I'm trying to get Windows Task Scheduler to run a particular .exe every 10 minutes or so, but the options only allow for once a day execution. Is there a way I can get it to run a .exe every 10 or 20 minutes?
kacalapy
  • 8,667
  • 18
  • 69
  • 111
285
votes
15 answers

What is the Windows version of cron?

A Google search turned up software that performs the same functions as cron, but nothing built into Windows. I'm running Windows XP Professional, but advice for any version of Windows would be potentially helpful to someone. Is there also a way to…
Thomas Owens
  • 107,741
  • 94
  • 299
  • 427
273
votes
7 answers

Java Timer vs ExecutorService?

I have code where I schedule a task using java.util.Timer. I was looking around and saw ExecutorService can do the same. So this question here, have you used Timer and ExecutorService to schedule tasks, what is the benefit of one using over…
kal
  • 26,197
  • 48
  • 119
  • 147
234
votes
16 answers

Best way to run scheduled tasks

Today we have built a console application for running the scheduled tasks for our ASP.NET website. But I think this approach is a bit error prone and difficult to maintain. How do you execute your scheduled task (in an windows/IIS/ASP.NET…
Niels Bosma
  • 11,312
  • 27
  • 86
  • 143
205
votes
8 answers

How can I enable the Windows Server Task Scheduler History recording?

I have a Windows Server 2008 with scheduled tasks running, mainly .bat files calling PHP files. I have 2 users on the server, one Admin and the other is a Standard user. I used the Standard User to clear the history log in the Task Scheduler…
martti d
  • 2,292
  • 2
  • 15
  • 20
199
votes
5 answers

How to run cron once, daily at 10pm

I had entered: * 22 * * * test > /dev/null However, I am being notified via email that this is running every minute. I am confused I guess because I thought this was correct for what I am wanting.
user420095
198
votes
12 answers

How to schedule a periodic task in Java?

I need to schedule a task to run in at fixed interval of time. How can I do this with support of long intervals (for example on each 8 hours)? I'm currently using java.util.Timer.scheduleAtFixedRate. Does java.util.Timer.scheduleAtFixedRate support…
RYN
  • 13,462
  • 29
  • 105
  • 163
177
votes
16 answers

Run a batch file with Windows task scheduler

I have a batch file daily.bat, this is the code: cd C:\inetpub\wwwroot\infoweb\factuur\cron c:\PHP\php.exe -f ./cron_pdf.php ftp -s:ftp_upload.txt ftp.site.be And I created a task with task scheduler in Windows 7. When I run the batch manually,…
Ruben
  • 7,959
  • 12
  • 58
  • 89
157
votes
7 answers

How can I trigger a Kubernetes Scheduled Job manually?

I've created a Kubernetes Scheduled Job, which runs twice a day according to its schedule. However, I would like to trigger it manually for testing purposes. How can I do this?
aknuds1
  • 57,609
  • 57
  • 177
  • 299
155
votes
2 answers

How do I set a Windows scheduled task to run in the background?

Does anyone know how to set a scheduled task to run in background using Windows Task Scheduler? There doesn't seem to be any option to do this.
Samuel Liew
  • 68,352
  • 105
  • 140
  • 225
153
votes
2 answers

Creating Scheduled Tasks

I am working on a C# WPF project. I need to allow the user to create and add a scheduled task to the Windows Task Scheduler. How could I go about doing this and what using directives and references do I need as I am not finding much when searching…
Boardy
  • 31,944
  • 94
  • 238
  • 411
143
votes
7 answers

why windows 7 task scheduler task fails with error 2147942667

I am facing a strange problem. I have scheduled a task to lauch a batch file. When I run the task with option Run only when user is logged on everything works fine. but I want to run this task in background and hence i am running it using the option…
Alok
  • 2,889
  • 3
  • 22
  • 47
1
2 3
99 100