Command line to manage assets

Hi Luis,

It’s possible to manipulate the sqlite3 database directly, you can set the asset enabled field to 1 or 0 based on some aspect of the asset name (this requires a bit of scripting, but it’s quite doable)

basically: name the assets with “INOFFICE” and “OUTOFFICE” in the name, then select all the assets matching INOFFICE and when during office hours, set the enable bit to 1, and reverse for the OUTOFFICE. If you put all this in a script and run the script when you want to switch from cron, you’re in business :wink:

It’s probably best to do this only when necessary, otherwise you run the risk of the web ui trying to update the db when the script is running or vice versa… (should be handled by locking, but still)

Cheers

/Simon