Author Topic: Widening scheduler capebilities  (Read 3515 times)

Offline davidq666

  • Contributor
  • ***
  • Posts: 1302
  • Watashi Wa Ero Desu!
Widening scheduler capebilities
« on: June 03, 2009, 08:10:52 pm »
A scheduler is always a very nice tool if u want to automate. Right now the scheduler "only" manages bandwidth, but wouldn't it be great if it could also handle things like:

-maxtransfer within a specified timeframe(xx GB per 1 hour, per several hours (from yy am zz pm), per day of the week, per month)
-enableing computershutdown at a predefined time
-switch servers automaticaly at a predefined time

What do u think?
« Last Edit: June 05, 2009, 08:39:11 am by davidq666 »

Offline munchies2x

  • Contributor
  • ***
  • Posts: 3
Re: Widening scheduler capebilities
« Reply #1 on: August 31, 2009, 11:16:09 am »
-enableing computershutdown at a predefined time

This is something I would suggest as well. At the moment, the download has to be complete before altbinz shutdown a computer. The problem is by the time I have to go for work, my download is still running, so I kinda left my computer on the whole afternoon. Would be nice if altbinz automatically shutdown after certain time....

THANKS!!!  ;D ;D ;D ;D

Offline davidq666

  • Contributor
  • ***
  • Posts: 1302
  • Watashi Wa Ero Desu!
Re: Widening scheduler capebilities
« Reply #2 on: August 31, 2009, 01:31:38 pm »
-enableing computershutdown at a predefined time

This is something I would suggest as well. At the moment, the download has to be complete before altbinz shutdown a computer. The problem is by the time I have to go for work, my download is still running, so I kinda left my computer on the whole afternoon. Would be nice if altbinz automatically shutdown after certain time....

THANKS!!!  ;D ;D ;D ;D
only the unpaused downloads have to be completed before alt.binz shuts down the computer
anyways why would u want alt.binz to shut down the computer even though the download hasn't finished yet? what i originaly meant was something like alt.binz automaticaly pushing the shut down button at a certain time. for example if u expect a certain post to be picked up at the latest at 3 am u would have alt.binz push the the shutdown button at 3 am via schedueler. it would then finish the download an shut it self down afterwards

Offline munchies2x

  • Contributor
  • ***
  • Posts: 3
Re: Widening scheduler capebilities
« Reply #3 on: October 01, 2009, 03:22:05 pm »
Quote
anyways why would u want alt.binz to shut down the computer even though the download hasn't finished yet?

Well in Australia we have on-peak and off-peak download and download allowance. Normally off-peak is much larger than on-peak, in my case unlimited. My off-peak start at 2am until 8am in the morning. So I set the scheduler to start from 2am till 8am. The problem is I left for work around 7am. So if the download has not been completed, the computer will stay on for the rest of afternoon. Would be nice alt-binz has an option to shut down, no matter whether the download is finish yet......

Offline davidq666

  • Contributor
  • ***
  • Posts: 1302
  • Watashi Wa Ero Desu!
Re: Widening scheduler capebilities
« Reply #4 on: October 01, 2009, 03:32:53 pm »
Quote
anyways why would u want alt.binz to shut down the computer even though the download hasn't finished yet?

Well in Australia we have on-peak and off-peak download and download allowance. Normally off-peak is much larger than on-peak, in my case unlimited. My off-peak start at 2am until 8am in the morning. So I set the scheduler to start from 2am till 8am. The problem is I left for work around 7am. So if the download has not been completed, the computer will stay on for the rest of afternoon. Would be nice alt-binz has an option to shut down, no matter whether the download is finish yet......

ah and alt.binz turned on the general pause button but didn't shut down. so maybe (via option) the schedueler could pause all open collections instead of the turning on pause, because than the shutdown would occur as soon as the scheduler sets the limit to 0...

Offline Ashe

  • Contributor
  • ***
  • Posts: 16
Re: Widening scheduler capebilities
« Reply #5 on: October 01, 2009, 07:44:54 pm »
-enableing computershutdown at a predefined time

This is something I would suggest as well. At the moment, the download has to be complete before altbinz shutdown a computer. The problem is by the time I have to go for work, my download is still running, so I kinda left my computer on the whole afternoon. Would be nice if altbinz automatically shutdown after certain time....

THANKS!!!  ;D ;D ;D ;D
There's probably quite a lot of free programs out there that would do that for you, doesn't need to be built into Altbinz really.

Offline Hecks

  • Contributor
  • ***
  • Posts: 2011
  • naughty cop
Re: Widening scheduler capebilities
« Reply #6 on: October 01, 2009, 08:44:26 pm »
Doesn't even need a proggy if your Power Management is configured properly.  Otherwise e.g.:

http://users.telenet.be/jbosman/poweroff/poweroff.htm

Here's a sample powershell script that uses it with altbinz_status.xml:

Code: [Select]
## dlmon.ps1 ##

param ([switch]$hibernate)

## VARIABLES ##
$env:path += ";c:\program files\poweroff"
$abstatusxml = "C:\Program Files\Altbinz\altbinz_status.xml"
$abstatus = {[xml] (get-content $abstatusxml)}
  
## FUNCTIONS ##

function Log-DateTime
{
   get-date -format "dd/MM/yyyy HH:mm:ss"
}

function Write-Header
{
   write "======================================================="
   write ".............Download Monitor (Powershell)............."
   write "======================================================="
}

function Connect-Altbinz
{
   write ((Log-DateTime) + " Connecting Altbinz ................")
   $abstat = &$abstatus
   if ($abstat.altbinz.connect -imatch "false")
   {
      $abstat.altbinz.connect = "true" ; $abstat.save($abstatusxml)
   }
}

function Disconnect-Altbinz
{
   write ((Log-DateTime) + " Disconnecting Altbinz .............")
   $abstat = &$abstatus
   $abstat.altbinz.connect = "false" ; $abstat.save($abstatusxml)
   sleep 30
}

function Get-DownloadStatus
{
   write ((Log-DateTime) + " Checking AB download status .......")
   $queue = (&$abstatus).altbinz.queuesize
   write ((Log-DateTime) + " Starting queue: " + $queue)
   $start = get-date
   $count = 3
   sleep 10
   while (-not ((&$abstatus).altbinz.ETA -imatch "Unknown"))
   {
      if ($count -eq 4)
      {  
         $speed = (&$abstatus).altbinz.currentspeed
         write ((Log-DateTime) + " Download speed: " + $speed)
         $currqueue = (&$abstatus).altbinz.queuesize
         if ([double]($queue -replace " MB") -lt [double]($currqueue -replace " MB")) {
         write ((Log-DateTime) + " New queue size: " + $currqueue)}
         $queue = $currqueue
         $count = 0
      }
      $count++
      sleep 15
   }
   $span = new-timespan $start (get-date)
   $duration = ("" + $span.hours + "h " + $span.minutes + "m " `
                   + $span.seconds + "s")
   write ((Log-DateTime)  + " Total duratiom: " + $duration)
   sleep 20
}


function Start-Hibernate
{
   write ((Log-DateTime) + " Hibernating .......................")
   poweroff.exe hibernate -warn -warntime 60 -msg "PC will Hibernate in 60 seconds ..."
}

function End
{
   write ((Log-DateTime) + " ENDED .............................")
   write "`r`n======================================================="
}


## COMMANDS ##

clear-host
Write-Header
Connect-Altbinz
Get-DownloadStatus
Disconnect-Altbinz
if ($hibernate) {Start-Hibernate}
End