Questions tagged [scheduled-task]
A scheduled-task means the launch of a program or script at predefined times or after specified time intervals.
663
questions
3
votes
1
answer
4k
views
Task Schedule not executing at "Startup" when created through GPO Preferences
I've noticed if I create the Task for all my PC's on my DC through GPO Preferences with the "At startup" trigger (no matter what I execute, it can be VBS, EXE, PowerShell ...), Task will never execute....
1
vote
1
answer
7k
views
Migrated Task on Server 2016 Task Scheduler rejected because of missed task start
this question maybe is connected too (Windows Server 2016 scheduled task schedule must be in future) but the issue is still there at our side...
We too migrated from Server 2012 R2 to a new Server ...
1
vote
0
answers
151
views
Creating a schedule task and runas domain user, "runas" is not selectable
I have a Windows 2016 domain controller. When I try to create a schedule task in group policy, the Run as box is not checkable:
Any ideas?
0
votes
0
answers
17
views
Something's issuing CTRL_CLOSE_EVENTS but no one is logged in
We're running an Azure server, Windows Server 2012R2. Just of late we've been seeing various scheduled console applications going down because they've received CTRL_CLOSE events.
However, no one has ...
2
votes
2
answers
4k
views
Unable to see Scheduled Task even with access rights to SYSTEM32\Tasks
I have a follow-up question to this.
I have a task folder RPA with two tasks as follows:
I created these two tasks myself using the Task Scheduler UI (as in above image). My trouble is I am now ...
0
votes
0
answers
1k
views
Scheduled Tasks Triggering When Not Scheduled
Server environment: Windows Server 2012 R2
Hello,
I've been experiencing a strange issue on one of the servers I administrate and was hoping someone could point me in the direction of some answers.
...
2
votes
1
answer
686
views
If two scheduled tasks are missed, in which order will they run next?
Let's assume we have two scheduled tasks, both with the option Run task as soon as possible after a scheduled start is missed toggled on.
These tasks are conflicting. In this case, one of them turns ...
2
votes
2
answers
7k
views
Scheduling task on Windows Server 2016 using group managed service account failing
I have created a new group managed service account in AD and added two servers to access the account. I am able to use the account in services.msc. It is accepting it there but when I am trying to ...
2
votes
1
answer
210
views
Is it possible to set a scheduled tasks to run both directly before and directly after a windows update?
We're currently attempting to find a solution to better automate our Windows updates on our IIS machines. We have an infrastructure that is hit by thousands of transactions at all hours of the day; ...
4
votes
3
answers
10k
views
Almost All Scheduled Tasks Fail: The system cannot find the file specified. (0x80070002)
In Windows 7 x64 I am attempting to create a scheduled task that runs a PowerShell script, but no matter what I try, it fails with the error: "The system cannot find the file specified."
And then I ...
5
votes
1
answer
7k
views
What is the best way to run cronjob in AWS ECS?
I have a web app powered by Laravel that is set up on AWS ECS. I would need to run an artisan command as a cronjob.
I'm looking at "Scheduled Tasks" in ECS Cluster configuration. I can launch new ...
1
vote
0
answers
325
views
Task scheduler update log location
we had batch job running at task scheduler, Recently Someone had change Event Log Size to "do not overwrite event" at TaskScheduler/Operational
this setting got the any log??
3
votes
1
answer
4k
views
Data Collector Set was not found (0x80300002) on Scheduled Task
Server: Microsoft Windows 2012 R2 (w/ SharePoint 2013 on the system).
Getting the this error:
Data Collector Set was not found (0x80300002)
I have a scheduled task that runs automatically on system ...
0
votes
1
answer
583
views
Powershell script won't restart on failure
I'm running windows 10 pro.
I have a powershell script that starts every day at midnight and runs all day. It's controlled by the Task Scheduler. The script itself works fine and in the event of an ...
3
votes
0
answers
3k
views
Defining multiple triggers for my Task Scheduler will only work on the first trigger
I have "Windows server 2008 R2 standard" with SP1. and inside my windows Task Scheduler, i define the following 2 triggers:-
now as the picture is mentioning, i want to run the task on different ...
4
votes
1
answer
2k
views
Server 2016 Scheduled Task fails on specific hardware model with error 0x8007052e
I've got a strange problem relating to basic Windows Scheduled tasks that has baffled me for a few weeks now. These jobs fail to run on some servers, but work on others which are running on different ...
3
votes
1
answer
5k
views
Execute a Windows task triggered by registry changes
I'm looking for a possibility to execute a script in case a particular registry key is going to be created or modified. In the Windows Taks Scheduler there is a way to execute scripts triggered by ...
1
vote
0
answers
952
views
How to create a scheduled task to run on system startup(without user logging in) in Windows server 2016 azure vm
I have a windows server 2016 server in Azure which is mainly used for running a few scripts.
I want to create a schedule where a script should run at the system startup(around 3-5 mins delay is also ...
0
votes
1
answer
796
views
How can I enable, scan, and disable windows defender from inside a scheduled task?
If windows defender is disabled can you later (through a script) enable, run a scan and then disable it via a powershell script that is invoked as part of the scheduler?
If this is possible then ...
1
vote
1
answer
2k
views
PowerShell script on Scheduled Task sends email on some servers but not others
hopefully somebody can help me fathom this as it's doing my head in a little! [I'm new, so please be gentle :) ]
I recently set up a PS script to run by Windows Scheduled Task at startup, via batch ...
0
votes
1
answer
510
views
Scheduled powershell to replace batch file ends too soon or never ends [closed]
First I'll explain the context, because maybe I'm not doing it in the right way.
We have an ERP developed using Oracle Forms 6i (yes, is really old). It has forms and reports. Reports have such ...
1
vote
1
answer
791
views
Execute a scheduled task on one (and only one) domain controller
I am setting up an Active Directory domain. It includes some Linux servers that use sssd to access the users and groups of the domain.
Because the users and groups need a UID and GID for that (I don'...
2
votes
2
answers
4k
views
Can you edit the *conditions* of a scheduled task via CMD?
I know you can create and edit the actions and triggers of a scheduled task via CMD, but when I open the created task in Task Scheduler all of the Conditions are set to their default configurations. I'...
1
vote
0
answers
276
views
Cygwin ssh with keys error - A specified logon session does not exist
Update: The issue is only on Windows server 2008 R2. I created a Windows server 2012 R2 VM and it works fine.
I want to run some windows query through ssh, but this is a interesting issue which I'm ...
0
votes
1
answer
2k
views
Why is (notepad.exe) scheduled task running as SYSTEM process, but not displayed in the GUI?
I have created the following scheduled task using an Administrator cmd.exe:
schtasks /CREATE /RU SYSTEM /SC ONLOGON /TN SYSTEM_notepad /TR C:\Windows\System32\notepad.exe
The scheduled task runs ...
3
votes
0
answers
4k
views
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 ...
2
votes
2
answers
199
views
How to run a script on a server 1 minute after a commit has been made?
Apart from creating a 2nd script which would check the time of the last commit and then run the main script and which would be too complex of a solution, is there a simpler one?
2
votes
1
answer
2k
views
Save scheduled tasks with powershell
I want to save my scheduled tasks using powershell.
I tried this:
$taskpath = "\mytasks\" # all of my tasks are in this folder in Task Scheduler
$savefolder = "C:\tasks" # where I want to save ...
1
vote
1
answer
4k
views
PowerShell script running from scheduled task: action failed to start, directory name invalid
I have a Windows Server 2012 R2 server running a scheduled task with three actions, each running PowerShell scripts:
Each of these actions "starts in" the relevant (and correct) directory:
...
0
votes
2
answers
52
views
schedule backup job runs up to 9 hrs without errors
I'm very new to administration job...
I have SQL server 2012, on that my senior scheduled a job for schedule backup. But, recently I noticed, after 8-May-2018(up to 26-May-2018) the backup files are ...
2
votes
0
answers
122
views
When creating new basic task Windows scheduler getting stuck
I have Windows SBS 2011 server with one secondary Windows 2003 domain controller, no other problems found, but when I try to create new basic task on the SBS, all works well till pressing the Finish ...
1
vote
1
answer
160
views
Windows task fails but throws no errors and writes no output
This creates a task that works and writes to a file:
schtasks --% /create /tn "test" /sc minute /mo 10 /ru SYSTEM /tr "powershell get-date | out-file -Encoding:ascii c:\log.log"
This does not create ...
0
votes
0
answers
182
views
AWS serverless setup for recurring tasks?
I have a database consisting of many items. At least one time per day I want to loop through all items in this database and for each item, call an external API to fetch current data about this item ...
2
votes
1
answer
12k
views
Enable and disable scheduled task with PowerShell and variable
if I try to enable and disable a scheduled task with PowerShell this works.
Enable-ScheduledTask -TaskName "Name of my task"
Disable-ScheduledTask -TaskName "Name of my task"
But if I'm trying this ...
0
votes
1
answer
1k
views
Copy folder from network drive via GPO/scheduled task permissions
To install a portable software package, I'm using a scheduled task that runs on user logon to copy a folder from a network share to the local computer using robocopy.
If I'm not mistaken, in order to ...
1
vote
2
answers
2k
views
PowerShell New-ScheduledTaskTrigger requires user input?
I'm trying to add a Powershell script to task scheduler to run on a regular basis.
Import-Module ScheduledTasks
$scriptFilePath = "C:\hello-there.ps1"
$action = New-ScheduledTaskAction -Execute "...
1
vote
1
answer
4k
views
Windows Task Scheduler: Why is the minimum frequency once per minute?
The Windows Task Scheduler will not allow you to run a task more frequently than once per minute. To get around this we can set up multiple triggers to run the task every minute but with staggered ...
4
votes
1
answer
3k
views
How do I run Register-ScheduledJob from a script running as SYSTEM?
I'm trying to run Register-ScheduledJob from a script executing as SYSTEM (from an external deployment tool), but I get an error. This must be initially invoked as SYSTEM due to the way the deployment ...
-1
votes
2
answers
765
views
How to fix Win2003 Task Scheduler Error 0x8007000d: The data is invalid after re-joining domain?
After re-joining this Windows 2003 Server box with the domain, all 20+ Scheduled task jobs were unable to start.
An error has occurred attempting to retrieve task account information.
You may ...
1
vote
0
answers
965
views
Difference between Powershell execution states? powershell.exe versus .ps1 file?
I created a task scheduler task, via the MMC GUI to run powershell.exe with some conditions that follow (starting a service).
I notice that this is different than running a .ps1 file or powershell ...
1
vote
3
answers
13k
views
Issues deploying a Scheduled Task through GPO
I am having trouble deploying a Task to all the workstations in my environment.
I am trying to setup a simple task that reboots at a specific time;
In my research on trying to accomplish this, I ...
0
votes
2
answers
5k
views
I need to configure a domain user to run a scheduled task
Here is my configuration (on DC):
Note: user is just regular on the domain.
What I am missing?
When I run:
gpresult /user asap\deltacopy /V
I get this:
INFO: The user "asap\deltacopy" does not ...
1
vote
1
answer
10k
views
How to properly run Powershell scripts containing BITS operations from Task Scheduler?
I am trying to perform an automatic backup of some files and folders based on a configuration. This is done using Powershell 5 which in turn relies on Background Intelligent Transfer Service (BITS). E....
1
vote
1
answer
2k
views
Scheduler not working on windows server 2016 EC2 instance aws, while EC2 is running?
I have setup a few batch files to execute python scripts on window. I have confirmed the batch files work by double click them which lauches CMD to show the scripts running.
I have setup a task ...
0
votes
0
answers
1k
views
Run two cron jobs in sync
I would like to run cron job A every 3 minutes, and cron job B every 5 minutes. But I would like job A to always run 3 minutes before job B.
How would I accomplish this?
0
votes
1
answer
4k
views
PowerShell script does not run program using UNC paths or mapped drive when running from windows 2016 task scheduler
I am running powershell scripts from the Windows 2016 task scheduler that execute a program using either UNC paths or a drive mapped in the script.
Both variants run fine in powershell but do not ...
-2
votes
1
answer
1k
views
What's the difference between /var/spool/cron and /var/spool/cron/crontabs?
This went unmentoned anywhere else I could find, not even in the man page of crontab. what's the difference between them?
some people say they don't have /var/spool/cron/crontabs, but one can easily ...
2
votes
1
answer
429
views
Clear clipboard with Scheduled Task
I'm trying to create a Windows scheduled task to clear the clipboard, but without success.
I know how to clear the clipboard using Powershell, and I know how to make a Scheduled Task, but I haven't ...
1
vote
1
answer
602
views
How to start, stop a server automatically, based on http requests?
I am using cloud services (say AWS EC2) for my development servers. Those are generally big servers and I am paying for them. After I use them, sometimes I forgot them running for days so I end-up ...
1
vote
2
answers
3k
views
Powershell - NewScheduledTaskTrigger for last Tuesday of every month
Not sure if this belongs in stackoverflow as it relates to PowerShell, but posted here as it isn't scripting and is more server task related.
I am trying to recreate a task we have on our old file ...