The monthend script should run and give the “found” variable a value of either true or false after being called from line two of the nightly script. When returning to the nightly script there seems to be no value in ‘found’, none of the if statements run anything from “nightly”
I know this was noted to work on v3 betas, can someone direct me to how to alter this script for 2.9?
You have to debug it using different symbols. The best thing you can i do is is go into sys scripts edit monthend source then from there see where the problem is and keep changing it untill it sits right with that version of OS. I beleive you will have to change the :if’s n () and all of that.. Just look at the 2.51 scrips and compare and see what you should probibly change it to to get it to work. GOOD luck
Thanks for your tips, I have now got these scripts to run nicely. Also kudos to krige - your scripts have opened the world of mikrotik scripting to me, I am now working on a script to run with the userman package much like the warningemail script but it changes the speeds of the user relevant to the percentage of the users cap
ie auto throttle back to 64k when it is > 99% of cap and back to a higher speed if the same value is < 99%.
If I can get this to work = nice
Although the throttle rates per user are held in UM like this:
rate-limit=" 128k/270k 0/0 0/0 0/0 7"
. so therefore, that whole " 128k/270k 0/0 0/0 0/0 7" must be loaded in a variable, then split etc.
Anybody aware of how to get the Rate limit (RX and TX) fields individually from the UM?
Yea it is a very good script. I have learned alot about script when debugging it. I created a script to send out a global message to all users in usermanager, sending e-mails to all the users lettin them know there will be downtime on such and such a date because of upgrades or replacement of equipment etc etc./.. -Jordan
FYI, if you have the scripts all working on 2.50 ROS you should put that in the wikie or get a hold of Krige and have him possibly update his wikie with the version 2.50 Automated billing script… talk to Normis he may know better what to do? maybe you could earn a licenes off from it… Not sure anyways - over and out
That is because it was built for the 3.0 ROS. However i beleive airstream is editing it to work with 2.9.51 so maybe he can provide you with the edited version of the Auotmated billing script. -Jordan
Hi all, I do have edited working scripts roughly based on Krige’s code for both v2.9 and v3. They include some/all the features from Krige’s billing script with added bits for on the fly capping “speed adjusting” of TX and RX speeds, automated email to customers that have hit their datacap or different stages that you can preset (say 5 Gib)etc. Automatic resetting of caps (throttles etc) and data used on the any particular day of the month etc.
Are these worthy of wiki? Does Krige want them for publish?
Either give krige the V2.9.X version of the script so he can update it to his wiki. Or you can post it on your own wiki and maybe get a free license for editing the script to 2.9.X. -Jordan
For anyone thats interested, I also started my mikrotik scripting with the AutomatedBilling one, and have since made one that doesn’t require the usermanager but has all the basic functionality that is required.
Regarding the end of month thing, I ended up making mine just run every hour and modified the month-end script to allow this and only run the monthly reports on the first hour of each new month (1am on the first day of a month)