LinHES Forums
http://forums.linhes.org/

Cronjob Restart
http://forums.linhes.org/viewtopic.php?f=5&t=12230
Page 1 of 1

Author:  kmkittre [ Thu Oct 19, 2006 7:51 pm ]
Post subject:  Cronjob Restart

I want a cronjob that will restart my server once a day. This is what I currently have, but it is not working:

Code:
0 3 * * 1,2,3,4,5 reboot


Any suggestions?
thanks.

Author:  mihanson [ Thu Oct 19, 2006 8:44 pm ]
Post subject: 

Why do you want it to reboot your box? Is there some kind of issue that's only cleared up with a reboot? If so, it may be a better idea to fix the problem so you don't have to do this.

Code:
0 3 * * * /sbin/reboot
should do it everyday at 3am.

Author:  tjc [ Thu Oct 19, 2006 8:48 pm ]
Post subject: 

Minor typo there, looks like it's missing the space between the miniutes and the hours...
Code:
0 3 * * * /sbin/reboot

Author:  kmkittre [ Thu Oct 19, 2006 9:38 pm ]
Post subject: 

Thanks, I guess I was missing the sbin part, we'll see how this one goes...

Over time, my PVR150 (2nd tuner) will decide to stop playing sound. So far, the only way I have found to fix the problem is to restart my backend. I have tried to resolve the underlying issue (even posted on these forums) but no one has come forward with a working solution. I am running an older version of Knoppmyth, so it may be resolved with an upgrade...

I am holding off on an upgrade because I will have to do 3 machines concurrently (One backend and two frontends). I just haven't had the time that would require.

Author:  tjc [ Thu Oct 19, 2006 10:12 pm ]
Post subject: 

Have yout tried just restarting the backend or reseting the ivtv driver rather than rebooting the whole system? Either one of those will take well under 5 seconds versus many minutes for a reboot.

Author:  mihanson [ Fri Oct 20, 2006 7:45 am ]
Post subject: 

As always, good eye, tjc. I need to answer post when I'm better rested! :)

Author:  mjl [ Fri Oct 20, 2006 8:41 pm ]
Post subject: 

Hi,
And after how many posts back and forth, finally the root issue comes out.
Why is it when folks have a problem they tend to leave out details? :)
Start with, I am running RxABCDx
Quote:
Over time, my PVR150 (2nd tuner) will decide to stop playing sound.

It has always done this? It has been this way since ?
I have been getting around the issue by:
Quote:
restart my server once a day
. ie, rebooting?

Now, present the request for the assistance to have a temporary fix do what you have in mind. As you may notice, several other good ideas come to the surface.
Quote:
0 3 * * 1,2,3,4,5 reboot


To explain the cron problem, (only roughly as that is all I know) cron is obedient, but not smart. Tell it when to do a job and where to go to do the job and it will watch the clock like a teenager working at a hamburger shop. 1,2,3,4,5 says only do this during the work week, but not where to find the tool to do the job. I always paste this at the top of my crontab... helps me remember... during the senior moments :) Needs either an * or a value
#min 0-59 * hr 0-23 * day 1-31 * month 1-12 * day of week 0-6(Su-SA) * /cmd

Not trying to bust marbles, just trying to help those who give their time to help guys like you and me without them having to playing quiz games when they could be pondering on things that deserve their skilled attention.

Mike

Author:  kmkittre [ Sun Nov 05, 2006 12:45 am ]
Post subject: 

This is my current crontab, and it is still not working:

Code:
0 3 * * 1,2,3,4,5 sbin/reboot


mjl:
"And after how many posts back and forth, finally the root issue comes out. "

I tried to find a resolution to the "root issue," but no one was able to help me, so I wanted help on my work-around.

Yes, it has always done this since I added my PVR-150 in addition to the PVR-350 I had before. The PVR-150 is the card that loses its sound.

I am running R5A30.2

tjc:
yes, I have tried just restarting the backend service. This does not resolve the issue. I have not tried resetting the ivtv driver, how does that work? /etc/init.d/ivtv restart?

Author:  tjc [ Sun Nov 05, 2006 2:01 am ]
Post subject: 

kmkittre wrote:
This is my current crontab, and it is still not working:
Code:
0 3 * * 1,2,3,4,5 sbin/reboot

Hopefully it's just a cut and paste error but you're missing the leading / on that executable path... Comapre it to the one I posted.

kmkittre wrote:
tjc:
yes, I have tried just restarting the backend service. This does not resolve the issue. I have not tried resetting the ivtv driver, how does that work? /etc/init.d/ivtv restart?

Actually it is/was an ivtvctl option. Something seems to have been lost in the v4l merge. There actually used to be a way to reset both the driver and the cards

Author:  kmkittre [ Tue Nov 14, 2006 7:28 pm ]
Post subject: 

nope, not a cut and paste error :oops:

Anyway, I've upgraded to R5D1, I'll wait and see if my problem with the PVR150 shows up in this version of Knoppmyth.

Author:  Russ [ Thu Oct 04, 2007 6:04 pm ]
Post subject: 

Reviving an old thread... is there a way in R5F27 to reset the ivtv driver & cards. My system locks up fairly regularly requiring a hard reboot. I suspect IRQ issues between the MB and three PVR cards installed.

tjc wrote:
kmkittre wrote:
This is my current crontab, and it is still not working:
Code:
0 3 * * 1,2,3,4,5 sbin/reboot

Hopefully it's just a cut and paste error but you're missing the leading / on that executable path... Comapre it to the one I posted.

kmkittre wrote:
tjc:
yes, I have tried just restarting the backend service. This does not resolve the issue. I have not tried resetting the ivtv driver, how does that work? /etc/init.d/ivtv restart?

Actually it is/was an ivtvctl option. Something seems to have been lost in the v4l merge. There actually used to be a way to reset both the driver and the cards

Author:  mjl [ Thu Oct 04, 2007 8:51 pm ]
Post subject: 

Hi,,

#min 0-59 * hr 0-23 * day 1-31 * month 1-12 * day of week 0-6(Su-SA) * /cmd
m h d m w /path /to /command
0 3 * * 1,2,3,4,5 sbin/reboot

translated =
0 minutes at 3 am any day any month on monday - friday try to execute reboot which you will not find in the sbin directory. It is in the /sbin directory

0 3 * * * /sbin/reboot in the root crontab should make the box reboot every day at 3 am

0 3 * * * /etc/init.d/mythtv-backend restart would make the backend restart. I do this to refresh my manual record schedule once a week for almost 2 years now (R5A16)

Are all pvr cards the same?
Mike

Author:  Russ [ Fri Oct 05, 2007 6:33 am ]
Post subject: 

mjl wrote:
Are all pvr cards the same?
Mike


Two PVR-250s and one PVR-150 with IR blaster working fine.

My mobo doesn't allow much in the way of manipulating IRQs. I will be upgrading my HW in the future but for now I have to re-init ivtv. I'd hoped to avoid rebooting only because it seems there's always a show being recorded no matter when the reboot is scheduled :-P

Author:  mjl [ Fri Oct 05, 2007 7:57 am ]
Post subject: 

Hi,

If it is an option, you may want to try a down grade to R5F1 to see if that resolves your issue.

With the ca-zillion hardware combinations possible it is hard for Cecil to achieve 100% "out of the box" for everyone. Damn close though!

I also have had "pauses" and only one card but not lockoups with F27, esc or ctl+alt+bksp will normally take me out.

Mike

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/