A scheduled-task means the launch of a program or script at predefined times or after specified time intervals.
Questions tagged [scheduled-task]
662 questions
12
votes
2 answers
Run task every 90 minutes with cron
Trying to adjust a cron job to run every 90 min. It was previously running every 20 min, which was a simple cron job:
*/20 * * * * whatever
To change it to every 90, it seems like I need to split it into 2 jobs, I've done this:
0 0,3,6,9 * * *…

Cory J
- 1,568
- 5
- 19
- 28
12
votes
6 answers
Is it possible for a Scheduled Task to run as NETWORK SERVICE?
It is quite simple to set up a task to run as a SYSTEM, but when setting it to NETWORK SERVICE it show "Access is denied" error message.
Is there any way to get this working? (The problem is that I don't want to create a new domain user for that…

Regent
- 518
- 1
- 7
- 10
11
votes
1 answer
Workaround for when windows scheduled tasks fails when user changes their password
When a users password changes that users scheduled tasks will fail unless you change the password associated with that task. This is a problem for me as I have a small script that gets run by a scheduled task every day on someone else's server.
They…

BenM
- 748
- 1
- 8
- 13
11
votes
3 answers
Can I schedule a windows task to run in an interactive desktop session?
I'm trying to create a scheduled task that will run once daily on a dedicated machine. The task will run an exe. That exe does a bunch of things, including running automation that manipulates the mouse/kb etc.
Is that possible (on any windows based…

Steven Evers
- 673
- 5
- 9
- 23
11
votes
2 answers
How to trigger a task at any change on a folder with Windows Server Task Scheduler?
Is it possible to start a script every time a folder tree is modified.
E.g.:
root
dir1
file1
dir2
file1
file2
root would be listened and if, for example, file2 is modified or a new file is added wherever in the directory tree, a…

Julio Guerra
- 255
- 2
- 3
- 8
11
votes
3 answers
Is it possible to disable a scheduled task from the command line in Windows XP?
On my Windows 7 machine I can run something like:
schtasks.exe /Change /TN "MyTaskName" /Disable
But /Disable doesn't seem to be available in Windows XP - is there any way of disabling it from the command line?

John Sibly
- 387
- 3
- 6
- 8
10
votes
5 answers
schtasks - create task with no schedule that runs on demand
I am trying to use schtasks.exe and create a one-time task that runs on demand. I just want to create the task without a schedule but the command schtasks /create /tn TestTask fails with Invalid syntax. Mandatory option 'sc' is missing.. Is there an…

Warz
- 235
- 1
- 3
- 7
10
votes
6 answers
50 workstations, 1 .bat file on a network server, will it work?
I have a .bat file to perform maintenance on machines. I put the .bat file on a network attached server for all workstations to access it.
If I were to use the windows scheduler to make that .bat file run at 12:00:00.000 on say... 50 workstations,…

Anthony Miller
- 457
- 3
- 6
- 19
9
votes
1 answer
Scheduled Task in Windows Server 2016, run by non-admin Users
In earlier windows server versions (prior to 2016) it was possible to grant non-admin users the permission to run a scheduled task by doing following steps:
Scheduled Task: run under system, execute script
Give user read and execute rights on…

n0rthclub
- 91
- 1
- 1
- 3
9
votes
3 answers
Ubuntu cron job every workday
On Ubuntu 16, I'm trying to trigger cron job at 8:00 AM on workdays, and here is what I've tried so far
0 8 * * 1-5 /path/to/command
and
0 8 * * MON-FRI /path/to/command
Does not work

Aleksandar Pavić
- 412
- 2
- 8
- 18
8
votes
1 answer
How can I modify an existing scheduled task using Powershell?
I am working on some release automation scripts that use Powershell to update existing scheduled tasks which execute various applications. In my script, I can set the Path and Working Directory of the application, but it doesn't seem to save the…

David Keaveny
- 408
- 1
- 6
- 12
8
votes
7 answers
How can I disable a scheduled task using Powershell?
I have a web application that runs on Windows Server 2008 R2, which has a large number of scheduled tasks which take care of all the backend stuff. When I do a software deployment which touches the database, I need to disable all the scheduled…

David Keaveny
- 408
- 1
- 6
- 12
8
votes
1 answer
Defrag options in Windows Server 2012
I am looking at the command line options for defrag.exe as well as the "ScheduledDefrag" task on Windows Server 2012, and I don't understand some of the arguments. In particular, when I view defrag /? I see:
/D Perform traditional defrag (this…

anon
- 404
- 1
- 5
- 15
8
votes
5 answers
Exchange PowerShell in a Scheduled Task runs forever
I have a couple of Exchange 2010 PowerShell scripts that I'd like to run as Scheduled Tasks.
If I launch PowerShell using "Run as different user" I can run the scripts and they execute correctly.
If I schedule a task using that same user, the task…

longneck
- 23,082
- 4
- 52
- 86
8
votes
2 answers
Task scheduler does not kill task
We have a scheduled task that sometimes hangs. It just stops responding. On Windows 2003, we had task scheduler configured to kill the task after 3 hours. It's a 32-bit process.
On Windows 2008 R2, we've set "Stop the task if it runs longer than"…

Andomar
- 943
- 1
- 10
- 23