PDA

View Full Version : Auto Restart a service every "X" amount of minutes


BmXStuD
09-23-2006, 03:55 PM
Nevermind i got it working. I didnt know a simple SSH command works with cron also.


Currently, with the way my server is setup it runs pretty well, but one of my major services likes tohang if its up to long w/o a restart. I currently have something to restart it every so often to avoid this problem, but it runs on my computer. However, what im wondering is if theres anything server side that can do this? Maybe a cron job?

If anyone would kind enough to write out the exact line i would add to a cron job. l'll be very thankful.


Thanks.

I have it setup like this to keep it within vps specs kind of.

Nevermind i got it working. I didnt know a simple SSH command works with cron also.

yager
09-23-2006, 11:32 PM
Responding after your edit which said, rather boldly, "I didnt know a simple SSH command works with cron also." ....

You can have a scheduled "restart" managed by cron on your VPS, or you could have a remote (i.e. at home) cron issue a "restart" of an application running on your VPS, via SSH from home to the VPS.

Or, ... you could just run the SSH "restart" from home, manually whenever you were in the mood, without ever bothering with cron on either end.

-
yager

BmXStuD
09-24-2006, 08:06 PM
Responding after your edit which said, rather boldly, "I didnt know a simple SSH command works with cron also." ....

You can have a scheduled "restart" managed by cron on your VPS, or you could have a remote (i.e. at home) cron issue a "restart" of an application running on your VPS, via SSH from home to the VPS.

Or, ... you could just run the SSH "restart" from home, manually whenever you were in the mood, without ever bothering with cron on either end.

-
yager



You can have a scheduled "restart" managed by cron on your VPS

Sorry for making it bold like that. I got it working with one the methods you mentioned.
"You can have a scheduled "restart" managed by cron on your VPS"