PowerScheduler++ 1.4.0.x - Stable versions for MediaPortal 1.4 | Page 3

Discussion in 'TV-Server Plugins' started by michael_t, April 16, 2011.

  1. michael_t

    michael_t Portal Pro

    Joined:
    November 30, 2008
    Messages:
    1,258
    Likes Received:
    580
    Ratings:
    +813 / 2
    Home Country:
    Germany Germany
    Show System Specs
    AW: PowerScheduler++ 1.1.3.0 - Stable version for MediaPortal 1.1.3

    You can do this by entering your script in the PS++ server config (Advanced tab - "Run command before standby / after wakeup").

    From the wiki:
    Before the system is going to standby (independent from PowerScheduler++) and after it has been waked up again, a command can be run with admin privileges. Select the desired executable file (.exe, .cmd, .bat) with the file browser button. The command is called with the argument suspend or wakeup.

    In the batch file you just have to check for the "wakeup" argument and then run your script.

    Michael


     
    • Like Like x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. polarie
    • Team MediaPortal

    polarie Retired Team Member

    Joined:
    November 20, 2006
    Messages:
    1,252
    Likes Received:
    140
    Gender:
    Male
    Occupation:
    self-employed
    Location:
    Hasloh (near Hamburg)
    Ratings:
    +147 / 0
    Home Country:
    Germany Germany
    Show System Specs
    AW: PowerScheduler++ 1.1.3.0 - Stable version for MediaPortal 1.1.3

    öhm check for the "wakeup" argument?
    sorry fürs deutsch:
    wie ist das gemeint mit dem aufruf/komando "suspend" oder eben "wakeup"?
    muß ich den aufruf in die batchdatei mit einpflegen? *neu-land*?
    EDIT:
    ich glaub deswegen hats nie richtig gefunkt bei mir und dem "alten" PS
    wie sieht die syntax aus beim einrichten (ein beispiel in der wiki wäre klasse)
    So?*grübel*:

    xyz.bat /standby
    oder
    db_repair.bat /wakeup

    i have not installed the PS++ till now so i didn't have seen all masks of the config ...
    it is possible to tell the PS++ sample.bat only by wakeup ... and sample2.bat only by hibernate?

    for me it is/was only important to run two(three) different *.bat files after resume/wakeup -
    not before standby...

    1st is: auto-logfile-delete.bat
    2nd is: mySQL-database-check-and-repair.bat
    3rd was: reboot-system.bat (via taskmanager - würde ja wegfallen mit PS++)
     
  4. netexplorer
    • Premium Supporter

    netexplorer MP Donator

    Joined:
    January 21, 2009
    Messages:
    727
    Likes Received:
    69
    Ratings:
    +101 / 1
    Home Country:
    Germany Germany
    Show System Specs
    AW: PowerScheduler++ 1.1.3.0 - Stable version for MediaPortal 1.1.3

    Hi,
    i think it should work like that:
    Code (Text):
    1.  
    2. IF %1 == wakeup goto wakeup
    3. :suspend
    4. REM place your suspend actionshere
    5.  
    6. goto end
    7. :wakeup
    8. REM place your wakeup actions here
    9.  
    10. goto end
    11.  
    12. :end
    13.  
    I didn't check that, so maybe something is a little different.
     
  5. polarie
    • Team MediaPortal

    polarie Retired Team Member

    Joined:
    November 20, 2006
    Messages:
    1,252
    Likes Received:
    140
    Gender:
    Male
    Occupation:
    self-employed
    Location:
    Hasloh (near Hamburg)
    Ratings:
    +147 / 0
    Home Country:
    Germany Germany
    Show System Specs
    AW: PowerScheduler++ 1.1.3.0 - Stable version for MediaPortal 1.1.3

    Micheal gave me a bit of the batch-code i can use to define

    Code (Text):
    1. if "%1" == "wakeup" (
    2.   xyz1.bat
    3.   xyz2.bat
    4.   ...
    5. )
    6.  
    and so it should work

    i think i can handle it like that (@ netexplorer THX again still use ur cmd-line)
    bring in the commands in one new batch-file so it'll do the job ...

    Code (Text):
    1. if "%1" == "wakeup" (
    2.  
    3. @echo Check Data-Base ...
    4. cd C:\Programme\MySQL\MySQL Server 5.1\bin
    5. mysqlcheck --user=root --pass=MediaPortal --auto-repair MPTVDB
    6.  
    7. @echo Deleting old Log-Files...
    8. cd C:\Dokumente und Einstellungen\All Users\Anwendungsdaten\Team MediaPortal\MediaPortal TV Server\log
    9. for /f "skip=5" %%i in ('dir /b/o:-n *.log') do del %%i
    10.  
    11. )
    12.  
    and all this code - inside ONE - batch-file should it make happen?

    will that also work with "reboot" instead of "wakeup"
     
  6. michael_t

    michael_t Portal Pro

    Joined:
    November 30, 2008
    Messages:
    1,258
    Likes Received:
    580
    Ratings:
    +813 / 2
    Home Country:
    Germany Germany
    Show System Specs
    AW: PowerScheduler++ 1.1.3.0 - Stable version for MediaPortal 1.1.3

    As I also posted you, I forgot the closing " after wakeup in the sample code. With this correction your script should be ok.

    You can use the same script also for reboot with an additional part
    Code (Text):
    1. if "%1" == "reboot" (
    2.  
    3.   @echo Do pre-reboot action ...
    4.   ....
    5.  
    6. )
    Michael
     
    • Like Like x 1
  7. polarie
    • Team MediaPortal

    polarie Retired Team Member

    Joined:
    November 20, 2006
    Messages:
    1,252
    Likes Received:
    140
    Gender:
    Male
    Occupation:
    self-employed
    Location:
    Hasloh (near Hamburg)
    Ratings:
    +147 / 0
    Home Country:
    Germany Germany
    Show System Specs
    AW: PowerScheduler++ 1.1.3.0 - Stable version for MediaPortal 1.1.3

    :D michael

    now it fits in :D



    Code for reboot - (maybe someone would like to use it too)

    after reboot auto-delete log-files (older than 5 days)
    and check mySQL Database (and autorepair) :

    Code (Text):
    1. if "%1" == "reboot" (
    2.  
    3. @echo Check Data-Base ...
    4. cd C:\Programme\MySQL\MySQL Server 5.1\bin
    5. mysqlcheck --user=root --pass=MediaPortal --auto-repair MPTVDB
    6.  
    7. @echo Deleting old Log-Files...
    8. cd C:\Dokumente und Einstellungen\All Users\Anwendungsdaten\Team MediaPortal\MediaPortal TV Server\log
    9. for /f "skip=5" %%i in ('dir /b/o:-n *.log') do del %%i
    10.  
    11. )
    12.  
     
  8. Distun
    • Premium Supporter

    Distun MP Donator

    Joined:
    May 4, 2011
    Messages:
    59
    Likes Received:
    9
    Gender:
    Male
    Ratings:
    +9 / 0
    Home Country:
    Norway Norway
    Show System Specs
    Re: PowerScheduler++ 1.1.3.0 - Stable version for MediaPortal 1.1.3

    I would use it if it had a "When utorrent done downloading, shutdown" feature. :)
     
    • Like Like x 1
  9. polarie
    • Team MediaPortal

    polarie Retired Team Member

    Joined:
    November 20, 2006
    Messages:
    1,252
    Likes Received:
    140
    Gender:
    Male
    Occupation:
    self-employed
    Location:
    Hasloh (near Hamburg)
    Ratings:
    +147 / 0
    Home Country:
    Germany Germany
    Show System Specs
    AW: Re: PowerScheduler++ 1.1.3.0 - Stable version for MediaPortal 1.1.3

    that is in ....

    the PS has a net trafic monitor ...

    no shutdown/hibernate when more than 2kb/s :D
     
  10. Distun
    • Premium Supporter

    Distun MP Donator

    Joined:
    May 4, 2011
    Messages:
    59
    Likes Received:
    9
    Gender:
    Male
    Ratings:
    +9 / 0
    Home Country:
    Norway Norway
    Show System Specs
    Re: PowerScheduler++ 1.1.3.0 - Stable version for MediaPortal 1.1.3

    *installed*
     
  11. revs
    • Premium Supporter

    revs MP Donator

    Joined:
    February 1, 2007
    Messages:
    1,274
    Likes Received:
    72
    Occupation:
    Software Developer
    Location:
    The Sauce of Worcester
    Ratings:
    +72 / 0
    Home Country:
    Wales Wales
    Re: PowerScheduler++ 1.1.3.0 - Stable version for MediaPortal 1.1.3

    Could someone expand on this line in the wiki

    What exactly needs to be set in the Windows power settings?
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!