SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Linux

Notices

SageTV Linux Discussion related to the SageTV Media Center for Linux. Questions, issues, problems, suggestions, etc. relating to the SageTV Linux should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-14-2013, 06:49 AM
drewg drewg is offline
Sage Icon
 
Join Date: Aug 2007
Location: Richmond, VA
Posts: 1,040
Linux suspend / resume script?

Does anybody have a suspend / resume script for Linux that looks at the upcoming sagetv recordings, and sets a machine to wake up ~5 minutes prior to the next scheduled recording?

Due to a recent policy change at work, I'm no longer allowed to work remotely using my own hardware, which means that my nice Xeon workstation / SageTV server is sitting idle during the day while I work on a crappy thinkpad. I was thinking it would be nice to suspend / resume the Xeon, based on the SageTV recording schedule.

Drew
__________________
Server HW: AMD Ryzen Threadripper 2990WX 32-Core
Server SW: FreeBSD-current, ZFS, linux-oracle-jdk1.8.0, sagetv-server_9.2.2_amd64
Tuner HW: HDHR
Client: Nvidia Shield (HD300, HD100 in storage)
Reply With Quote
  #2  
Old 04-14-2013, 10:05 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,676
I don't have a script... but you can use the sagex remote apis combined with wget and awk/sed to find the time of the next recording...

Code:
http://192.168.1.10:8080/sagex/api?c=EvaluateExpression&1=GetElement(GetScheduledRecordings(),0)&encoder=json&filter=ScheduleStartTime
That url will return scheduled start time of the next recording as a long value, so using awk (or something) you can parse that out.

I don't know if that helps...
Reply With Quote
  #3  
Old 04-14-2013, 06:26 PM
drewg drewg is offline
Sage Icon
 
Join Date: Aug 2007
Location: Richmond, VA
Posts: 1,040
EDIT: That's perfect, it even seems to output the date in a nice format!

Thanks!

Drew
__________________
Server HW: AMD Ryzen Threadripper 2990WX 32-Core
Server SW: FreeBSD-current, ZFS, linux-oracle-jdk1.8.0, sagetv-server_9.2.2_amd64
Tuner HW: HDHR
Client: Nvidia Shield (HD300, HD100 in storage)

Last edited by drewg; 04-14-2013 at 06:30 PM.
Reply With Quote
Reply


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

Advanced Search
Display Modes

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
ComChecker for Linux/Mac Script Version bcjenkins SageTV Customizations 10 04-30-2010 03:01 PM
S3 Suspend And Resume Issue. Nick_W SageTV Software 5 10-22-2009 07:57 PM
Script/Program to STOP/RESUME Process joe123 SageTV Customizations 2 03-10-2009 03:14 PM
Utility: Linux/OS X batch beta firmware upgrade script bcjenkins SageTV Customizations 3 08-13-2008 07:08 AM
Suspend and resume with SageTV mwhitlock SageTV Software 340 03-16-2006 11:18 AM


All times are GMT -6. The time now is 03:11 AM.


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