Week scheduler

  • Hi


    I am using OMV 4.X latest version, and I had some trouble when scheduling the startup of the system.
    The "Power Management" settings allow me to shutown/hibernate at a given date/time but never to restart.
    I managed to program a shutdown every day THEN a restart the next day using a cron task with the rtcwake command.


    It's a pretty solid workaround but every time I want to update my week settings it is quite a mess and I must use a pen/paper.


    It would be nice and comfortable to have a kind of calendar grid view of the perpetual week with 24 cells for each day to set when the NAS is expected to be up.
    When saving the config, the plugin clears its own previous settings in the crontab, analyze the grid searching for ranges when the NAS should be off, and create a new entry for each range to trigger a rtcwake with the proper parameters.


    Maybe such a plugin already exist, but if it is not the case it would be a very nice feature to add !

    OMV 6.x | Intel Celeron J3455 | 16Go RAM | USB2 32Go | HDD 3x4TO

    2 Mal editiert, zuletzt von Olivier ()

    • Offizieller Beitrag

    I'm not sure what you are trying to do. By using crontab directly it is possible to run a certain job at a certain time but only on a certain day of the week.


    So you could run a specific script each day of the week at a certain time. Or the same script but at different times and with different parameters each day of the week.

    Be smart - be lazy. Clone your rootfs.
    OMV 5: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

  • I'm not sure what you are trying to do. By using crontab directly it is possible to run a certain job at a certain time but only on a certain day of the week.


    So you could run a specific script each day of the week at a certain time. Or the same script but at different times and with different parameters each day of the week.

    In fact I want an easier way to plan/modify time ranges when my OMV is on and off.
    My goal is to have a grid of the week in 7x24 cells.
    I click on cells to set my OMV on or off (the cell goes green or grey)
    When I click on Save, a script analyze the grid and compute the cron jobs


    So far I made a planning file which contains 7x24=168 slots with 0 or 1 value (for off and on).
    I also made a script which scan this file as expected, and create the jobs the same way as the other modules.
    The only thing which is missing now is the GUI and the plugin packing.


    If someone is interested in the project any help will be greatly appreciated !


    Edit 1: I started some draft using the DIY guide, but it's quite tricky to get a working GUI.
    Ext JS Api is new to me so I'm not very confortable with this framework. At least I can get some sample code from the other plugins.
    But I don't know how to create my 24x7 clickable grid. Any idea ?


    Edit 2: One step forward. I made the clickable week calendar in good old HTML. The next step is to put this chunk of code into the php page.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!