FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   Add to FavoritesAdd to Favorites  * Code Snippets
 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: 5637
Location: Dorset, UK
Reputation: 1391
votes: 58

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.


_________________
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

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 Facebook ID
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