Win 10 Task Scheduler keeps disabling tasks - windows-task-scheduler

I use Task Scheduler to run a .bat file that zips and encrypts files and does a nightly backup of them to an external drive. I have used this for years and it has worked just fine. Starting a couple of months ago, the task is getting disabled in Task Scheduler and I cannot figure out why. I can enable it, and it will run again, but then gets disabled again the same day or in the next day or two. Then I noticed that it is not just this task, but other scheduled tasks (that I did not write) that are also getting disabled, all at the same time. Things like Google software update are getting disabled too.
I have been looking at the task history to see when tasks are disabled, and there is no common denominator that I can think of.
When I restart, all tasks are enabled. But what causes them to be disabled?????

I had this for months before I narrowed it down; with the help of posts from the likes of Paul above. Every task kept getting disabled, sometimes several times a day. In my case it was AVG anti-virus.
In AVG settings there is a tools menu, in there is a series of check boxes called "Do Not Disturb Mode". It seems AVG is trying to 'help' the user by not disturbing him if he is running a program full screen by turning off notifications, but it's over zealous and turns off all tasks too.
I unchecked all those tick boxes and didn't have the problem for two months. Then as a test I turned them on again and the tasks got disabled in just an hour or so.
I have had several AVG updates over the period and it's still present, so I don't think it's a bug as much as a feature.

I had the same problem that started in the last few weeks.
If you are running Avast anti-virus, there is bug [feature] that disables scheduled tasks and apparently never re-enables them. See this link: https://forum.avast.com/index.php?topic=249063.0

I had this problem last year. I believe if my memory serves me right that it happens when the Win 10 clock doesn't synchronise and the W32time service has stopped for some reason. If you go into task manager and select services, look for W32time and see if it is running. If it isn't right click and restart it

I had this problem last year. I believe if my memory serves me right that it happens when the Win 10 clock doesn't synchronise and the W32time service has stopped for some reason. If you go into task manager and select services, look for W32time and see if it is running. If it isn't right click and restart it
"Maintains date and time synchronization on all clients and servers in the network. If this service is stopped, date and time synchronization will be unavailable. If this service is disabled, any services that explicitly depend on it will fail to start."
Also check on Windows services for Windows Time to see if it is in manual or Automatic and change it to auto start (W32time)

Wow, thanks for this post. Would never have found out why my scheduled tasks are being disabled. I thought i was being hacked ! Ironically it is Avast's "Do not disturb feature". I had an app to auto-restart, and when this app restarted at the same clock time, all of my scheduled tasks would be disabled. Avast automatically decides to set multiple apps to "Do not disturb = True".
More details: https://forum.avast.com/index.php?topic=249063.0

Related

ASP.NE WEBSITE takes forever to respond

My asp.net web application is encountering down time everyday, it takes forever to respond. But once I stop and start (not iis reset) the website in IIS it will work again. Then hours/a day later it will become unresponsive again. What would be the reason? I'm suspecting an unclosed connection to database but hard to find them. The codes were made by the previous programmer.
Check the queue length which is a setting under apppool.
If its happening during a particular time of the day then please check the resource utilization like CPU/RAM consumed during that particular time.
There are APM tools like App Insight available which you can use to monitor the request response time for the requests.
You can implement Google analytics to see number of users online or requesting to see if its threshold issue.
Look into IIS logs during the time of issue and check the time-taken field. If its above normal, proceed to the following step
During the time of issue (before you restart the website), capture a manual hang dump of the w3wp process - https://blogs.msdn.microsoft.com/debugdiag/2013/03/15/debug-diagnostic-1-2-generate-a-manual-hang-dump-on-a-specific-process/
Run Debug Diag report and share it if you can. It'll tell you things that are possible going wrong.

Google Cloud Stackdriver Debugger - production debugging?

How does stackdriver debug application which are in production?
Will the server be down during this period?
How would the latency be?
Is there a way we can debug to an incident that's 'already happened'? e.g. I have an application running in production. And there was an issue - say, I wasn't able to add an item to the shopping cart, or some other issue. Can we go back and debug the issue? Or does it debug the live application?
Stackdriver Debugger's core functionality is rapidly taking a snapshot of your running operation. This means your server is not down, but also means that you can't go back in time either.
Stackdriver Debugger has a quickstart and various other docs that can be useful in getting a basic understanding of what the product does.
Stackdriver Debugger is an always on, whole service debugger. You don't debug just a single server/VM but rather all of your servers belonging to the same service, at the same time. It captures the call stack and variables from a single server when the condition hits and then cancels the snapshot from all other servers.
Stackdriver Debugger agent doesn't stop the process, but briefly pauses the thread hitting the snapshot line and condition. Usually the thread is paused for about 3ms to capture ~64K of information, your time may vary.
Stakdriver Debugger agents are written from scratch with the purpose of optimizing for application latency. They use all sort of tricks to avoid pausing the running thread/server. (e.g., serialization of the data happens after the thread is released)
Stackdriver Debugger is a realtime interactive debugger. There is really now way to debug something that happen in the past. However, since it's a production debugger you can set your snapshot location in production and wait of the event to happen again.
One other feature of Stackdriver Debugger that might find useful are logpoints. These are log statement that you can insert dynamically to your application with a specific case/condition in mind. You don't have to make code changes or re-deploy your service. see the blogpost.

Quartz.net Jobs after IIS Reset or server shutdown

I have used Quartz.Net to schedule some jobs in my ASP.net Application.
I am using default JobStore I think it is RAMJobStore but I am not sure exactly I only know I didn't config anything about Store.
Well the problem is that I want to store all jobs in DB so that I can run remaining jobs again when server resets or shutdown and start again .
I know I can store Jobs to DB using AdoJobStore but I want to know If my application server restarts and application not running in IIS how those remaining jobs can be triggered again ?
Is there any tutorial about this ? does anyone had some experience about triggering stored jobs after server reset ? any help would be appreciated
A. You will use AdoJobStore (as mentioned in comments).
B. You need to understand and tweak the "misfire" configuration. There is not a simple "yes" or "no" answer to this question.
http://royontechnology.blogspot.com/2009/03/so-you-think-you-understand.html
Since quartz.net is a java port over, you can also find helpful information here
http://www.nurkiewicz.com/2012/04/quartz-scheduler-misfire-instructions.html
Here is a sample paragraph (in case that link dies in the future at some point)
Sometimes Quartz is not capable of running your job at the time when
you desired. There are three reasons for that:
(1) all worker threads were
busy running other jobs (probably with higher priority)
(2) the scheduler
itself was down
(3) the job was scheduled with start time in the past
(probably a coding error)
The second one "(2)" (in the above quote) is your scenario.
The then goes on to explain scenarios and options.
Things to internet-search if any of the articles disappear in the future.
java'ish
org.quartz.jobStore.misfireThreshold
c#
"So you think you understand misfireThreshold"

BizTalk MessageBox > 60GB

I have a BizTalk 2010 Server up and running for a few months.
Recently we noticed that the MessageBox grows and throttling kicked in.
In production, the MessageBox is > 60 GB and the trackingdata view returns 1.5m records.
In our acceptance environment, the trackingdata view returns about 300k records.
We missed to create a dedicated tracking host in the first place, but managed to create one in acceptance last week. The dedicated tracking host has not changed anything in our acceptance environment, therefore I have not yet created one in production.
All jobs are enabled and run continuously without an error.
In acceptance, I do not have any running/suspended messages.
I also can't find any exceptions in the event log.
I'm looking forward to any hint to improve the setup and reduce the messagebox size.
Thanks & best regards
Michael
Have you checked to see the sql server jobs that purge records from the database are running?
Look at the sql server agent job named 'MessageBox_Message_Cleanup_BizTalkMsgBoxDb' (there are others there as well). They normally run periodically to clean things up. You might run the job manually and see if there are errors and check the job activity monitor.

In web/cloud applications, how can I have an automated task (based on date/time)?

My web site stores invoices.
I would like to process them every night at midnight.
I would also like to send out notices nightly at midnight.
But the web is stateless.
I do not have my own server.
Is there a way?
No, you need a Windows Service on a dedicated box, however the box can be virtual and in the cloud.
You do not own your own server, but your website must be hosted somewhere. You may want to see if you can install windows services on to that server. If you can, I would strongly recommend using a service to run any automated tasks. It is generally frowned upon to use IIS to run automated tasks simply because the process shuts down after periods of inactivity... and if IIS isn't running, neither will your automated task.
A similar question was asked a while back and I think the answers are still very relevant to your problem: Best way to run scheduled tasks
And even further, after google searching I found even more info which you might find helpful:
https://blog.stackoverflow.com/2008/07/easy-background-tasks-in-aspnet/
http://www.codeproject.com/KB/aspnet/ASPNETService.aspx
If you absolutely cannot install a service, you could try something like creating a new thread on Application_Start() that checks the time and decides whether or not to run. Then, to keep IIS running during periods of inactivity, you could possibly try spawning a process or something every few minutes to send a request to your server and thus keep it from shutting down.

Resources