1

I have a frustrating problem.

I'm trying to run a vbscript every hour on the hour with Windows Task Scheduler. Windows 10 Pro, not on a domain, logged on locally as a Windows user, not Microsoft account. I have the task set up to run under my user account, run only when I'm logged on, if the task fails, restart every minute up to three times, if the running task does not end when requested, force it to stop and if the task is already running, then the following rule applies: run a new instance in parallel. The trigger is set to daily at 5:00 AM every day, repeat every 1 hour (or every 1 minute until I can get it to work), for a duration of indefinitely and stop task if it runs longer than 1 minute. The trigger is enabled.

I can run the task manually from the Task Scheduler UI and it runs. However it does not start periodically. With the setting above I see no reasons why it wouldn't.

The history log of the task seems erratic. it doesn't run right after I set it up, but it seemed to start logging something this morning: I have a big series of events, all 31 seconds after the whole minute, saying "missed task start rejected". The description says "Task Scheduler did not launch task "saytime" as it missed its schedule. Consider using the configuration option to start the task when available, if schedule is missed." I don't see any entries saying that the task was started, or that an attempt was made, except when I start it manually.

I checked the Windows event logs but there was nothing there.

This seems retarded. Task Scheduler, why are you so lazy? Why not just run the tasks on time rather than wait 31 seconds and then tell me it's too late now? Nowhere did I indicate that the task should only be run if Windows is idle.

Despite all the bells and whistles, Task Scheduler seems totally unreliable. I'm about to look for a cron clone because simple things like this are straightforward on Linux - it just works and troubleshooting is actually possible.

Searches online for similar problems are useless, they lead to the typical results for any issues with Windows:

  • Microsoft forums where accredited professionals tell people they understand their problem, are there to help and then direct people to ask somewhere else or look for a solution somewhere else, none of them seem to know anything. I wish that stuff was kept out of Google.
  • ad-filled Web pages like the one that starts with obvious suggestions, such as "check if the task scheduler service is running" then makes you set up other user accounts and finally gives up and tells you your user profile may be corrupted. Whatever.

Thanks for putting up with the rant. I'm frustrated.

What could be going on? Why is Task Manager not doing what its been told?

Thanks.

3 Answers 3

1

Despite all the bells and whistles, Task Scheduler seems totally unreliable. I'm about to look for a cron clone because simple things like this are straightforward on Linux - it just works and troubleshooting is actually possible.

It has always been unreliable for me. I have tried dozens of times to set up different startup scripts, and it can't even work reliably. It either works only 2 or 3 times then never again, or it just never works. On startup, on logon, with or without admin privileges... Anything. Just totally unreliable.

Microsoft forums where accredited professionals tell people they understand their problem, are there to help and then direct people to ask somewhere else or look for a solution somewhere else, none of them seem to know anything. I wish that stuff was kept out of Google.

I hate those help threads with a passion. Thanks for understanding the issue, even though you literally aren't able to provide simple steps to fix my issue!

2
0

I know right? I've been trying to learn how to use windows without a GUI and it's extremely difficult. Not because it can't be done but due to all the internal complexity that I need to be aware of to achieve any task.

Anyway two questions. Is your machine on at 5am? Do you have "Run task as soon as possible after scheduled start missed" checked?

If you've answered yes to either of these questions, then my suggestions probably won't help. At that point I'd recommend trying something extremely simple like echoing the date to a file.

But otherwise this is what this unix geek has learnt about windows task scheduler service.

Task scheduler is not like cron. The most fine grade trigger event you can get is once a day. There is also once a week, once a month or a number of specified events (logon, logoff, machine start, remote connection to the desktop, or some user defined event ID...)

However a single trigger can be repetitive and run as often as once per minute indefinitely or for a specified duration. After using cron this feature seems to make no sense but is the only way to get the granularity of cron.

If your trigger start time is missed your task won't start and won't repeat. So you need to use the option to start the task as soon as possible, This is under settings and not triggers. Start immediately does appear to align with the Start Boundary Time and Interval of the trigger. So if your start time was 12:00:00am and your repetition interval is 1 hour and your machine booted up at 9:30am, then it would wait until 10:00 to start the task.

However I'm not sure what would happen if you rebooted your machine after the daily job had started because windows would consider the trigger not to have been missed. I'd need to reboot to test this and lose what I've typed here so far, I'll have to leave that for another comment.

You can specify multiple triggers for one action. You could specify 24 once a day triggers and not have to worry about edge cases where the machine is rebooted. But you're probably going to need some scripting to make this easier.

I'll get back to you after this reboot.

0

I have a big series of events, all 31 seconds after the whole minute, saying "missed task start rejected"

I got this after updating the exe that was called by the scheduler. The resolution seemed to be to go into the task setup, make a change that was then reverted and then apply the change which caused the task to be re-authorising and entering the account password.

To be honest i would be surprised if windows task scheduler will cope with a setup that specifies that a task can run up to start time of the next event. As a previous poster states, the maximum granularity you have is 1 minute.

Windows task scheduler is not a robust product. Even in server 2019, it still fails to run the task after the hour has changed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .