[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 331
  • Last Modified:

Windows 2003 server software or tool to stop and start a scheduled tasks if they hang

Hi,

We have some scheduled tasks set to run on a server that are database import/export related. To cut a long story short the database and scheduled tasks are written by a 3rd party, who don't see any issues with the jobs.  Problem is these jobs just stop from time to time and need to be restarted. Once restarted the jobs run fine, but the 3rd party doesn't want to investigate - support is currently being looked at but this still needs to happen.

All that said the jobs simply need to be restarted, and I am looking for some software or a tool that we can use to moitor these jobs and restart them if they are running for longer than 15 minutes.  Would be fine to do this manually, but this tends to happen around 5:00 - 7:00am in the morning.

Anyway if someone knows of a piece of software or a tool to sort this out let me know.  

Thanks,
Dave

 
0
biggles70
Asked:
biggles70
  • 4
1 Solution
 
Alan HardistyCommented:
You might want to look at GFI MAX Remote Management - it can monitor the server and restart a service if it is stopped if that is what you want it to do.

Great bit of software!

http://www.gfi.com/it-managed-services-software
0
 
Lionel MMSmall Business IT ConsultantCommented:
How are the tasks run? Automated in the 3rd party software or via Windows scheduled tasks?
0
 
biggles70Author Commented:
They tasks are run using Windows scheduled tasks. The tasks actually run a 3rd party vendor exe file which has switches and an input file.

Just looking for something cheap/free and only for one server.  
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
Lionel MMSmall Business IT ConsultantCommented:
You can setup scheduled tasks so that they terminate after a certain amount of time--it seems you know that it should not run for more than a certain amount of time. In the Settings tab in Scheduled tasks is an option to control that. I also suggest you use a batch file to start the task and have the batch file check for the successful file for that day--the import/export file--I assume it is unique every day (if not let me know and I can give you another suggestion of what to check for). As such, the batch file will first check for today's file--if it exists it will exit if it does not it will call or start the import/export. To make sure that the task does complete successfully setup the tasks to repeat. Assuming it takes the task 10 minutes to import/export setup the task to repeat every 20 minutes for 1 hour (or whatever you want)--this can be done in the Schedule section of Scheduled tasks and click on the advanced button. So what you end up with is a scheduled tasks that runs at a certain time by batch file--it looks for a successful file--if it finds it it quits, but if not run the import/export--if it runs for more than 10 minutes it will be stopped, but then again in 20 minutes the task will run again and go through the same process--that way if it is not successful it can try however many times you decide it set it up as to re-try. The only problem I see is that Windows Scheduled Tasks may not be able to stop the import/export but only the batch file. Will this work for you--if not let me know and I can come with other ideas/suggestions.
0
 
Lionel MMSmall Business IT ConsultantCommented:
Another question--if you run the import/export successfully and then try to run it again will it know it was previously run successfully and simply not do anything? If yes, then bag my batch file idea and setup the import/export application with the repeat and terminate options.
0
 
Lionel MMSmall Business IT ConsultantCommented:
I put quite a bit of time into this and gave my best options and solutions but without giving me further feedback the user is now wanting to close the question. Not sure if what I suggested would work or not because user did not give me further feedback or information. As such I should get the points for trying to help even though user did not respond to my latest suggestions.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now