Logic Machine Forum
Update Schedules from Central Repository - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Update Schedules from Central Repository (/showthread.php?tid=2571)



Update Schedules from Central Repository - sjfp - 09.04.2020

Hi looking for suggestions on best way to to move forward on a large project we are involved with.
We have a lot of commercial sites for a single client that wishes to have the ability to update the timed scheduled event in all sites from a centrally managed facility management.
They would like to have a schedule of all store opening( in a spreadsheet or CSV file) trading times like (See Attached):-

There will be over 100 stores we want to update. So we are looking at the best way to push the updated CSV file to all LM's and have each LM update their schedules automatically. All LM's are connected on the clients own networks and we can see all LM's/

This solution may also be adapted to actually update from time to time the LM's themselves, with a centrally stored .tar.gz file update posted to all LM's to do a self update with.

Any suggestions would be great appreciated. And may be a bit of coding to help along the way.
Thank you.


RE: Update Schedules from Central Repository - buuuudzik - 09.04.2020

For me better would be to prepare some server with simple API and all LMs should fetching current settings from it.

This central server could be set up also on some LM.

In very simple way you could use for this task exported group addresses or .lp files with very simple script.

For second way you could have your settings in storage.

Code:
<?
require('apps')
require('json')
_SCRIPTNAME = 'Central schedule'
_CONFIGKEY = 'centralSchedule';

local config = storage.get(_CONFIGKEY, {})
print(json.encode(config))
?>