View Single Post
  #2604  
Old 04.04.2023, 16:35
rakasha681 rakasha681 is offline
Modem User
 
Join Date: Apr 2023
Posts: 1
Default limit overall daily downloads

Hi!
Is it possible to write a script that will set an overall daily download size quota?

Something along the lines of:
A) When a download finishes it checks a date+time based CurrentDownloadPeriod VariableA, if it doesnt exist or is outside of the previous 24hrs it sets the current date/time
B) sets a CurrentPeriodTotalDownloadSize VariableB (which also gets reset in A if A resets the date variable) that adds the completed downloads size incrementally as each download finishes,
C) if CurrentPeriodTotalDownloadSize > 250GB, pause all downloads, wait 25hours, reset Variables A&B, and resumes all downloads

If that's possible, which seems likely, if someone could write that for me without it being too much trouble, I'd appreciate it :D

While my scripting knowledge is pretty limited, I'm also not opposed to trying to piece one together with all the previous examples/online help files, and then come back for more help when it doesn't work, lol. Actually, that's what i am going to do, but this will be a nice way to get the ball rolling for help when i come back frustrated that nothing i tried worked, and would be cool if some awesome person wrote a working option for when i can't figure it out, lol :D

Thanks!
Reply With Quote