Need minute-level scheduling and API for rules

3 posts · Closed

Gergo Giczy Guest
20 Feb 2018

Dear Developers!

I have used your great product at different companies since 2004 and like it so much, but now I ran into a problem which I cannot solve with the current features of BM.

I need to enable/disable specific rules at different times by minute-level resolution, with multiple schedules by hour, day, week, 2-weeks, and month.

The best solution would be to use the built-in scheduler to create templates where I could define the needed occurrences of from-to date/time, including explicit start-end timestamps as well as recurring start-end times by hourly/daily/weekly/monthly base.
It would also be helpful to define

  • disabled-to-enable
  • enabled-to-disable
    by schedule modes defined in the specific bandwidth rule.

I know this is not a trivial development, but I'm sure it adds value to your product to be more profitable for your other customers too.

Another solution path (at least for me) would be to have a simple web-based or other API to make it possible for the rules to be enabled/disabled programmatically from a third-party controller, from where I can run the needed schedule myself, e.g., by HTTP requests.

The background is that we are a school with a 2-week recurring timetable for the affected machines, so we need different active rule sets at the 45-minute teaching time and the 10-minute gaps between, as well as the holiday times. Our Internet connection has fairly low bandwidth, and so we hope to solve our administrative vs educational traffic to be kept balanced by scheduling the rules of your product on our main router.

Many thanks for your attention and keep up this good work in the future.

Gergo GICZY
Technical High School of Ujpest, Budapest, Hungary/EU

Andrew SoftPerfect
22 Feb 2018

You are right: it's not a trivial addition. While it may be useful for some users, we prefer to keep the product as simple as possible, leaving customisation to the users.

For complex usage scenarios, rules and quotas can be modified by an external program or script. We use a standard SQLite 3 database that can be read and written from many programming languages and environments. You can find it via the path shown under the Storage tab in menu File - Settings:

You can read this database with any SQLite management tool like SQLiteSpy. Rules are stored in the RULE table, and just about any setting can be manipulated with SQL.

We have also just published a new build of BM that automatically checks if the database was changed and reloads it when necessary. So if you install the latest build, you can do something like this:

BEGIN TRANSACTION;
UPDATE RULE SET ENABLED = 1;
UPDATE RULE SET ENABLED = 0 WHERE NAME = 'Test';
COMMIT;

This will enable all rules except for any rule(s) named Test. Please make sure to place multiple commands in a transaction as the database will be reloaded upon commit.

Gergo Giczy Guest
22 Feb 2018

Wow, thank you so much for this hint, Andrew!

I will definitely check out this possibility and write an app with a short code to read the actually necessary schedule and apply it into your database.

This topic is closed. It has had no new posts for over a year, so the software versions it talks about may be out of date. Start a new topic in Bandwidth Manager if you have a similar question.