question

EricC-4692 avatar image
1 Vote"
EricC-4692 asked AlexeySkirko-7722 commented

Task scheduler - Windows 2019 - Indefinitly task not running

Hi,

This is not a qestion, this is an answer ! I hope it could help because I spent hours.

On Windows server 2019, if you have a task to repeat let say every 5 minutes indefinitly, You have to trigger it this way :
- On a schedule
- One time
- Advanced settings / repeat tasks every xxx minutes for a duration Indefinitly.

or

  • On a schedule

  • Daily

  • Advanced settings / repeat tasks every xxx minutes for a duration 1 Day.


On Windows server 2012, 2008, I used to select "Daily" instead of "One time" for an indefintly period, but if you do so in Windows 2019 Task scheduler, the task will never run, when the time is come it just schedule the next time without running any program.

It sounds finally logic but you have no information about why the task is not running (and there is not entry log in the task scheduler history), and the next run time is however exact, but nothing happens

Regards,

Eric

windows-server-2019
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you!!! Great find. Had the same issue on a new 2019 Server and it was driving me crazy.

0 Votes 0 ·

OMG! Thank you!!! So frustrating when MS mixes things up just for the sake of doing so. After 8 years of no issues, when I would need to edit a task it would then suddenly not work in 2019!?! Now I can work-around this bug. Thanks again :-)

0 Votes 0 ·
KarlieWeng-MSFT avatar image
0 Votes"
KarlieWeng-MSFT answered

Hi Eric @EricC-4692

Thanks for sharing with us !

I truly appreciate your efforts on working this issue. I believe this knowledge must can help a lot of others.

Microsoft Tech Community would also be a great platform to share and learn. We could post there as well. :)


Best Regards
Karlie


If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

KarlieWeng-MSFT avatar image
0 Votes"
KarlieWeng-MSFT answered

Did you enable the operational log ?

81013-image.png



image.png (63.8 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

EricC-4692 avatar image
0 Votes"
EricC-4692 answered KarlieWeng-MSFT commented

Hi,

Thanks for the follow up.

I enabled the log, and there was nothing in it. The conclusion was tasks were not running, and I have to understand why ;-)

Best regards.

Eric

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Do you have another Windows server 2019, is it the same result?

0 Votes 0 ·
EricC-4692 avatar image
0 Votes"
EricC-4692 answered

Unfortunatly no other windows server 2019.

Best regards,

Eric

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MullinsMichaelE-4032 avatar image
0 Votes"
MullinsMichaelE-4032 answered

I have the same problem with the Task Scheduler on a Windows 2019 Server. I found if I selected Indefinitely the task will not run. Once I selected Weekly and everyday of Day of the week and set the duration to 365 days the task Started to function Correctly. I am going to experiment with going back to Daily and set the time to every 5 min and try different of day's by year ie.. 365, 730,....

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

OleksiiSkirko-1611 avatar image
0 Votes"
OleksiiSkirko-1611 answered OleksiiSkirko-1611 edited

Guys, any update on it?
I confirm this issue on my Windows 10 20H2. I create a scheduled task via GPO and set Trigger as Daily, repeat Every 1 hour indefinitely - and have the same issue - the task doesn't run:
110191-schedule.png



schedule.png (78.2 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

EricC-4692 avatar image
0 Votes"
EricC-4692 answered AlexeySkirko-7722 commented

Hi,

Try to change for a duration of : "Indefinitely" to "1 Day". See my first post which is a workaround for this "problem".

Regards,

Eric.

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, thank you for your reply.
In Group Policy editor, I cannot change duration for Scheduler. It allows me ti choose only 1 day, 12 hours etc.
This is simple combobox without ability to edit..

0 Votes 0 ·

I can confirm this as a working fix for me.

I had set the task on Windows 10 to repeat every 5 minutes. When "Duration" was "Indefinitely", it never repeated after 1st run. But when "Duration" was set to "1 Day", it was able to execute every 5 mins.







0 Votes 0 ·

Finally I found a workaround for my GPO:
I pointed a particular duration in Scheduled Task XML (it may be as long as you want). After that, scheduled tasks started running
135052-screenshot-2021-09-24-133130.png


0 Votes 0 ·