Forum Discussion
erickgomes
Jun 25, 2019Copper Contributor
Scheduled Task Windows Server 2019 (EDIT)
Hello guys, I'm having a problem with the Windows Server 2019 Task Scheduler. It does not work as in Windows Server 2012. What do I need to do to make this work? EDIT: Guys, what I ...
KreativeKai
May 06, 2020Copper Contributor
TimRSA Did you find a solution to the scheduled task issue? I'm also frustrated at Microsoft.
I have about 30 VB Apps that are humming along on a Windows 2008 server using scheduled tasks. They all do a variety of simple to complex tasks from pulling data and merging letters on a monthly basis, posting data on our website, converting data to crystal reports, etc.
It’s now past the time for us to get off of our Windows 2008 server so I’m taking the apps and converting them up from Visual Studio 2012 to Visual Studio 2019. No real hurdles. Everything is converting fairly clean and running great.
Problems begin when I set the apps up on Windows Server 2019. We have a user that is used for processing tasks and has the appropriate rights on the server. If the tasks are setup to run overnight and I leave the server signed on, the tasks process fine. If I sign off of the server the tasks show that they ran and that they completed successfully, but never finish processing. The status shows they completed at the same time the schedule is triggered, and most of the tasks normally should run 15 minutes to an hour.
Nothing in the event log to say it failed, and I have a good bit of error code built into each program that would fire an error if one was triggered.
The task is setup to “Run whether user is logged on or not”, and also “Run with highest privileges”.
Did something change since 2008 regarding scheduled tasks that I should be aware of? Any suggestions / help with this is appreciated.
TimRSA
May 06, 2020Copper Contributor
KreativeKai Yeah I used the other guy's solution, I have a task that I check if my app pools are running every 1 min. so The only way I got it to work was not to use the "Daily" setting but to say "One time" and set this in repeat task every {time} for a duration of in my case every day going forward so Indefinitely.
- aris_zoisMar 12, 2021Copper ContributorSorry for late question... If you set "One time" it will do the job. What will happen if system restarts? Will task begin again?
- doublehelixApr 15, 2021Copper Contributor
aris_zoisUnfortunately ti does not re-run if the server reboots...
We have the same issue (worked prior to server 2019 but not any more) where we have:
Run Daily / Repeat every 5 minutes, Indefinitely.... NEVER Runs.
We fixed it by setting it up to:
Run Daily / Repeat every 5 minutes, for a period of one day.
- ariszoisApr 22, 2021Copper Contributor
doublehelix The solution you suggested that makes things happen in case of restart is the change from "Indefinitely" to "for a period of 1 day". Thanks!
- RBEngineerNov 16, 2020Copper Contributor
TimRSA Is there a similar fix for tasks that I want to run weekly? The "repeat task every" option only seems to have 5min - 1hour, but that's way too frequently for my task.
- KreativeKaiMay 06, 2020Copper Contributor
TimRSA Appreciate the response. I'll try this. I might also write a service in Visual Studio to basically create my own scheduled task app to get around this issue.