How to schedule a task to call a URL
Use the Invoke-WebRequest cmdlet from Powershell. In your task: Action: Start a program Program/script: powershell.exe Arguments: -Command “Invoke-WebRequest http://myapp/BackgroundTask/Run”
Use the Invoke-WebRequest cmdlet from Powershell. In your task: Action: Start a program Program/script: powershell.exe Arguments: -Command “Invoke-WebRequest http://myapp/BackgroundTask/Run”
The anwser to another question resolved my issue as well. The steps I did were: enable-psremoting on the server in an admin powershell prompt Set-PSSessionConfiguration -Name Microsoft.PowerShell -ShowSecurityDescriptorUI on the server in an admin powershell prompt Added the service account (or security group) with full privileges sc sdshow scmanager on the server in an admin … Read more
This is the issue described in KB2617046: if you disable and then enable a scheduled task, duplicate triggers are created. The task properties still shows only one trigger, but you can see that the task is triggered multiple times simultaneously in the task history. There is a hotfix available from Microsoft. The hotfix says it … Read more
See This link at Microsoft on using at and schtasks to manage scheduled tasks from the command line.
I asked this same question. Fortunately RyanRies was able to provide a correct answer. In Windows Server 2003 you cannot run a scheduled task as NT AUTHORITY\NetworkService (aka the Network Service account). That capability only was added with Task Scheduler 2.0, which only exists in Windows Vista/Windows Server 2008. Bonus Chatter LocalService Account is a … Read more
That should work, except that you need: 0 0-21/3 * * * whatever 30 1-22/3 * * * whatever 24 hour time 🙂
We just noticed the same issue on our production servers (also Windows Server 2012), which occurred this week. It also started after our clocks went back one hour (which was November 3, 2013, here in Toronto). Update as at Nov 12, 2013: Rebooting did not work (tasks continued to run twice) Exporting and re-importing the … Read more
I believe your problem has to do with either the permissions of the account being used to run the task, or the context of the account as exists when trying to run the task. Test for Console Session Requirement It’s possible your .EXE must be run in Console session (aka Session 0) on the computer. … Read more
The only way I could stop this service without rebooting the server was to run a command prompt using the service account. Do this I used PsExec from Sysinternals psexec -i -s cmd In the new window I was able to issue the service stop command with no problem sc stop schedule
Troubleshooting scheduled scripts: If you haven’t already, check the Scheduled Tasks log file, in the GUI under Advanced > View Log. Search the file for “***” to find the most recent entries, and you may see a little extra error info. Define a log file to capture output, and send both standard out and standard … Read more