FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   Add to FavoritesAdd to Favorites
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    RSS Get RSS Feed  


Run a process. Kill & restart if it runs too long.

 
Post new topic   Reply to topic    Macro Scheduler and Windows Automation Forum Index -> Scripts and Tips
View previous topic :: View next topic  
Author Message
Marcus Tettmar
Site Admin


Joined: 19 Sep 2002
Posts: 5268
Location: Dorset, UK
Reputation: 1380
votes: 54
Earn Points, Win a T-Shirt

PostPosted: Tue Jan 31, 2006 5:18 pm    Post subject: Run a process. Kill & restart if it runs too long. Reply with quote

This script demonstrates how to schedule a process and then kill it if it is still running after a set amount of time. If the process is killed the script will restart it. You can set up the process, the timeout and the number of times it should try to restart it.

This example uses an FTP process as an example, but it could be any command line or program.


_________________
Regards,
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Please do not email/PM me for private support - post to the forum so that everyone benefits. For private support please send email via our web site.

Did this message help you? If so please reward the poster with Reputation Points? Reward Points
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:    View previous topic :: View next topic  
Post new topic   Reply to topic    Macro Scheduler and Windows Automation Forum Index -> Scripts and Tips All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group