PowerScheduler++ 1.4.0.x - Stable versions for MediaPortal 1.4 (4 Viewers)

michael_t

Portal Pro
November 30, 2008
1,258
813
Home Country
Germany Germany
AW: PowerScheduler++ 1.1.3.0 - Stable version for MediaPortal 1.1.3

...
or can i say PS++ that it should start the *.bat after resume (will that work also?)
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
 

polarie

Retired Team Member
  • Premium Supporter
  • November 20, 2006
    1,252
    152
    51
    Hasloh (near Hamburg)
    Home Country
    Germany Germany
    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++)
     

    netexplorer

    MP Donator
  • Premium Supporter
  • January 21, 2009
    736
    104
    Home Country
    Germany Germany
    AW: PowerScheduler++ 1.1.3.0 - Stable version for MediaPortal 1.1.3

    Hi,
    i think it should work like that:
    Code:
    IF %1 == wakeup goto wakeup
    :suspend
    REM place your suspend actionshere
    
    goto end
    :wakeup
    REM place your wakeup actions here
    
    goto end
    
    :end

    I didn't check that, so maybe something is a little different.
     

    polarie

    Retired Team Member
  • Premium Supporter
  • November 20, 2006
    1,252
    152
    51
    Hasloh (near Hamburg)
    Home Country
    Germany Germany
    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:
    if "%1" == "wakeup" (
      xyz1.bat
      xyz2.bat
      ...
    )

    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:
    if "%1" == "wakeup" (
    
    @echo Check Data-Base ...
    cd C:\Programme\MySQL\MySQL Server 5.1\bin
    mysqlcheck --user=root --pass=MediaPortal --auto-repair MPTVDB
    
    @echo Deleting old Log-Files...
    cd C:\Dokumente und Einstellungen\All Users\Anwendungsdaten\Team MediaPortal\MediaPortal TV Server\log
    for /f "skip=5" %%i in ('dir /b/o:-n *.log') do del %%i
      
    )

    and all this code - inside ONE - batch-file should it make happen?

    will that also work with "reboot" instead of "wakeup"
     

    michael_t

    Portal Pro
    November 30, 2008
    1,258
    813
    Home Country
    Germany Germany
    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:
    if "%1" == "reboot" (
    
      @echo Do pre-reboot action ...
      ....
    
    )

    Michael
     

    polarie

    Retired Team Member
  • Premium Supporter
  • November 20, 2006
    1,252
    152
    51
    Hasloh (near Hamburg)
    Home Country
    Germany Germany
    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:
    if "%1" == "reboot" (
    
    @echo Check Data-Base ...
    cd C:\Programme\MySQL\MySQL Server 5.1\bin
    mysqlcheck --user=root --pass=MediaPortal --auto-repair MPTVDB
    
    @echo Deleting old Log-Files...
    cd C:\Dokumente und Einstellungen\All Users\Anwendungsdaten\Team MediaPortal\MediaPortal TV Server\log
    for /f "skip=5" %%i in ('dir /b/o:-n *.log') do del %%i
      
    )
     

    Distun

    MP Donator
  • Premium Supporter
  • May 4, 2011
    59
    9
    Home Country
    Norway Norway
    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. :)
     

    polarie

    Retired Team Member
  • Premium Supporter
  • November 20, 2006
    1,252
    152
    51
    Hasloh (near Hamburg)
    Home Country
    Germany Germany
    AW: 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. :)

    that is in ....

    the PS has a net trafic monitor ...

    no shutdown/hibernate when more than 2kb/s :D
     

    Distun

    MP Donator
  • Premium Supporter
  • May 4, 2011
    59
    9
    Home Country
    Norway Norway
    Re: PowerScheduler++ 1.1.3.0 - Stable version for MediaPortal 1.1.3

    *installed*
     

    revs

    MP Donator
  • Premium Supporter
  • February 1, 2007
    1,274
    72
    The Sauce of Worcester
    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

    PowerScheduler++ is dependent on the PC’s power settings to perform its tasks. Thus before you begin to configure PowerScheduler++ you should have a look at your power settings.

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

    Users who are viewing this thread

    Top Bottom