View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 14 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: Cronjob Restart
PostPosted: Thu Oct 19, 2006 7:51 pm 
Offline
Joined: Tue Jul 12, 2005 8:01 am
Posts: 670
Location: Salem, MA
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 19, 2006 8:44 pm 
Offline
Joined: Sun Sep 25, 2005 3:50 pm
Posts: 1013
Location: Los Angeles
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.

_________________
Mike
My Hardware Profile


Last edited by mihanson on Fri Oct 20, 2006 7:44 am, edited 1 time in total.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 19, 2006 8:48 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Minor typo there, looks like it's missing the space between the miniutes and the hours...
Code:
0 3 * * * /sbin/reboot


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 19, 2006 9:38 pm 
Offline
Joined: Tue Jul 12, 2005 8:01 am
Posts: 670
Location: Salem, MA
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 19, 2006 10:12 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
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.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 20, 2006 7:45 am 
Offline
Joined: Sun Sep 25, 2005 3:50 pm
Posts: 1013
Location: Los Angeles
As always, good eye, tjc. I need to answer post when I'm better rested! :)

_________________
Mike
My Hardware Profile


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 20, 2006 8:41 pm 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
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


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 05, 2006 12:45 am 
Offline
Joined: Tue Jul 12, 2005 8:01 am
Posts: 670
Location: Salem, MA
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?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 05, 2006 2:01 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
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


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 14, 2006 7:28 pm 
Offline
Joined: Tue Jul 12, 2005 8:01 am
Posts: 670
Location: Salem, MA
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 04, 2007 6:04 pm 
Offline
Joined: Fri Jan 21, 2005 9:14 am
Posts: 124
Location: New York
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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 04, 2007 8:51 pm 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
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


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 05, 2007 6:33 am 
Offline
Joined: Fri Jan 21, 2005 9:14 am
Posts: 124
Location: New York
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


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 05, 2007 7:57 am 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
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


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 25 guests


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 post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu