SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Customizations
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-29-2010, 07:13 PM
mhubel mhubel is offline
Sage User
 
Join Date: Apr 2010
Location: Boston
Posts: 10
Automatic system and power shutdown

If anyone is interested, I have a very simple program that can be used with SageTV that can be used to automatically shutdown the computer if there is nothing to record. This is not a perfect solution for all.

It looks to see if there are any scheduled recordings as of a specific time and then can shut down the computer, or do something else, if not. It does not check to see if the SageTV program is being used at the time to view recordings.

The whole setup first assumes that the BIOS is setup so that the computer automatically turns on at a specific time each day. I have it set to 6PM. Then the SageTV is part of the automatic startup sequence. When SageTV starts, it looks in the file Sage.properties and if it finds the line:

scheduler_export_file=c\:\\sage_schedule.dat

it will generate a file c:\sage_schedule.dat which has a list of the things being recorded. Then a scheduled event is setup (I have it setup to 6:30 PM) to call the batch file startup_copy.bat, this will also save a copy of the sage_schedule.dat file, this can be removed, it is the first line in the file.
The program sage_sched_dec is then called and if it does not find anything to be recorded, a call is made to shutdown_bat.bat which will unconditionally shutdown the computer.

Finally, I have another scheduled event to always shutdown at 12:30AM so the computer will still automatically shutdown if something is being recorded. This event just calls shutdown_bat.bat

All the files in the posted attachment should be put in the same directory such as c:\bat

The source file is included if anyone would like to play with it.
Attached Files
File Type: zip sageTV_shutdown_7_29_10.zip (30.3 KB, 230 views)
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sky automatic power on harryf SageTV United Kingdom 6 02-14-2008 04:24 AM
SageMC - Add Shutdown link on front page to exit/power off castylx SageMC Custom Interface 1 08-19-2007 01:05 AM
New system, power supply recommendations, comments? davephan Hardware Support 4 08-06-2007 06:28 AM
StingySage: system with lowest possible power consumption? Halle Hardware Support 22 02-17-2007 10:26 AM
Nightly shutdown for power saving simonen Hardware Support 15 11-04-2006 04:38 AM


All times are GMT -6. The time now is 01:28 PM.


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