SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Software
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Software Discussion related to the SageTV application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the SageTV software application should be posted here. (Check the descriptions of the other forums; all hardware related questions go in the Hardware Support forum, etc. And, post in the customizations forum instead if any customizations are active.)

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-30-2004, 02:28 PM
perfessor101 perfessor101 is offline
Sage Advanced User
 
Join Date: Nov 2003
Location: Vancouver, British Columbia, Canada
Posts: 246
How do I start and stop sage via a DOS script?

Hello,
I would like all SageTV software to shutdown every day at 5:45am. I find if the server (windows xp mce 2005) runs for more than a 36 hours my wiz.bin file can easily become corrupted.
After the software closes, I want to perform a daily backup of the SageTV directory at which time I set my boot drive to dirty with fsutil and then use psshutdown to restart the system. At startup the drives set dirty will be scanned via Autochk and I have Orphan.bat in my startup folder to clear out any comskip generated files left behind after I've watched and deleted the show.
So far I've tried using 'net stop SageTVService' and it's saying that SageTVService is 'not an installed service'. Next I tried using taskkill which is stating that I must use the /F or FORCE shutdown switch. I'm not sure if I want to force a shutdown of the SageTvService as I don't know whether it will shutdown gracefully with the wiz.bin updated or corrupt the files I'm trying to backup.

Thanks for your time,
Bobby

Last edited by perfessor101; 12-30-2004 at 07:18 PM. Reason: grammar
Reply With Quote
  #2  
Old 12-31-2004, 11:16 AM
insomniac's Avatar
insomniac insomniac is offline
Sage Icon
 
Join Date: May 2003
Location: Concord, Ca.
Posts: 1,104
err...I wont get into the reasoning, but you can schedule a task to run a batch file for each command @ the specefied commands:

net stop SageTV

net start SageTV

Tadaa!
__________________
If you're not cheating, your not trying...

My sage rigs:
Server - Windows 2003, Intel 865 PERLL w/ P4 3.2g 1gb ram, 3-PVR250, 3-PVRUSB's, 1 Skystar2, 1 twinhan 102g, 1 starbox DVB-S Cards. Evo network QAM encoder. 1.2TB storage 6.x server + MTSAGE for DVB
Client 1/Master BR - MediaMVP running a 30" Olevia LCD TV.
Client 2/Front Room - Shuttle ST61G4 XPC 1gig ram, 60gb HD, BTC9019 wireless keyboard/mouse & Harmony 880. 6.x client. GF6600GT driving a Sony WEGA 55" rear projection tv.
Reply With Quote
  #3  
Old 12-31-2004, 11:43 AM
mdmint's Avatar
mdmint mdmint is offline
Sage Fanatic
 
Join Date: Apr 2004
Location: Vancouver, WA USofA
Posts: 877
I'd be more concerned with finding and correcting the root cause of wiz.bin getting corrupted than applying a bandaide. Shouldn't be happening. I'll go months without rebooting my dedicated Sage Server no problem. (WinXP Pro sp1)
Reply With Quote
  #4  
Old 12-31-2004, 12:33 PM
cmaffia's Avatar
cmaffia cmaffia is offline
Sage Expert
 
Join Date: May 2004
Posts: 612
Send a message via Yahoo to cmaffia
Quote:
Originally Posted by insomniac
err...I wont get into the reasoning, but you can schedule a task to run a batch file for each command @ the specefied commands:

net stop SageTV

net start SageTV

Tadaa!
These commands are only starting and stopping services.
Not sure if this is what he wants
__________________
Server: Dual Tuner: PVR-150MCE/PVR-250MCE/SageTV v5.02/Asus Pundit-R 2.4GHZ/512MB DDR RAM/250 GB Maxtor HD (8MB Buffer) External Seagate 400GB HD via USB 2.0/Onboard ATI 9100 using SVIDEO TV-Out/Nvidia DVD decoder/Actisys 200L IR Blaster (Dish receiver) USBUIRT (DirectTV receiver)/Lite-On 4X DVD-R/RW/Windows XP Pro SP2/Adesso Mini IR Keyboard w/integrated mouse/Tivo "Peanut" Remote via USBUIRT/Dish Network Model 301/DirectTV subscriber/Webserver Plugin v2.8
Reply With Quote
  #5  
Old 12-31-2004, 04:03 PM
sixdoubleo's Avatar
sixdoubleo sixdoubleo is offline
Sage Aficionado
 
Join Date: Dec 2003
Location: Sacramento, CA
Posts: 304
Send a message via Yahoo to sixdoubleo
If you're running Sage as a service, insomniacs method is correct. If you're running an actual sage instance, then I'd look at the SendMessage utility. Use it to send the "Power" command to Sage.
Reply With Quote
  #6  
Old 12-31-2004, 06:10 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
The "Power" command doesn't actually cause SageTV to exit -- it toggles between wake/sleep. Power ON & Power Off are discrete commands to do only those functions instead of being toggles. You could always send a Windows command to tell it to exit, though.

I thought the service exe or its control exe had parameters to tell it to start or stop from a batch file. If someone else doesn't post it, I'll try to remember to look it up when I get home to see if I know what I'm talking about.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #7  
Old 12-31-2004, 07:31 PM
perfessor101 perfessor101 is offline
Sage Advanced User
 
Join Date: Nov 2003
Location: Vancouver, British Columbia, Canada
Posts: 246
Thanks for the help ...

Thanks to everyone for the help.

Once I stopped using the 'net stop' command on SageTVService and started using it on SageTV everything went beautifully.
If I leave my Server running for more than 48 hours and then try adding a favorite by 'mistake' without rebooting first it will corrupt the wiz.bin file sometimes and I'll have to completely remove and then reinstall sage, restoring older and older backups of the wiz.bin file until it can run with a degree of stability. Quite often the restored wiz.bin will work initially but after the next reboot it will again be scrambled.
Why this is happening I am unsure, I have just done a fresh install of Windows XP 2005 MCE OEM on a 200GB Seagate drive purchased together on the Sage Server. Prior to this I was running Windows XP Professional OEM Slipstreamed with SP2 which seemingly ran without problems except for SageTV corrupting the wiz.bin file after adding a favorite if I left it running for too long.
Since I moved into my current appartment (11 months) I've had a cd-rom, DVD-rom, CD Writer, DVD Writer, two 40 GB & two 80GB Hard Drives die, in the preceding decade of PC ownership and use I never had any hardware die (except for a scanner I lent to a friend). Also my roommates microwave has taken to microwaving things at random times when no one is within twenty feet of it and the door his DVD Player will not stay open closing immediately.
It may be Gremlins, Ghosts or dirty power I know not which. I run my systems through an APC and Belkin Surge Protectors, but I think I may need to get a battery backup with power conditioning to solve the problems.

Thanks for your time and effort,
Bobby
Reply With Quote
  #8  
Old 12-31-2004, 08:35 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
As was said above, wiz.bin should _not_ be getting corrupted like that. I would consider contacting tech support to see if they could help track down why that is happening. I don't remember if you said what verison you are using; if it is an older version, you might try updating to the latest version, even the beta one to see if you still have problems with wiz.bin.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #9  
Old 01-01-2005, 07:11 AM
JasonJoel JasonJoel is offline
Sage Icon
 
Join Date: Mar 2003
Location: St. Louis, MO
Posts: 1,043
I would bet $10 on either brown outs (low power) and/or power spikes.

A UPS with power conditioning will almost certainly fix that. Just make SURE it has power conditioning, a lot of the cheaper UPSes do NOT.

Jason Bottjen

Quote:
Originally Posted by perfessor101
It may be Gremlins, Ghosts or dirty power I know not which. I run my systems through an APC and Belkin Surge Protectors, but I think I may need to get a battery backup with power conditioning to solve the problems.

Thanks for your time and effort,
Bobby
Reply With Quote
  #10  
Old 01-03-2005, 09:01 AM
Gog Gog is offline
Sage Advanced User
 
Join Date: Oct 2004
Location: Montreal, Canada
Posts: 97
I wasn't able to find the thread I read this one but I seem to remember someone having issues with corrupting wiz.bin when there was a large number of favorites or when trying to record by categories. Something to do with too many things in the recording queue and the conflict management flipping out.

Gog
Reply With Quote
  #11  
Old 01-03-2005, 10:39 AM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Quote:
Originally Posted by Opus4
I thought the service exe or its control exe had parameters to tell it to start or stop from a batch file. If someone else doesn't post it, I'll try to remember to look it up when I get home to see if I know what I'm talking about.
BTW -- in case anyone was waiting for a response to this... it turns out that I don't think I knew what I was talking about, since I don't see anything about it in my notes.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 05:08 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.