SOLVED Cron schedule for Power Management doesn't allow for Sunday in day-of-week

  • Server
    • FOG Version: 1.4.0
    • OS: Ubuntu 14.04.5
    • Service Version: 0.11.12
    • OS: Windows 10 1607, Windows 7

    I am trying to schedule a shutdown of computers on Saturday and Sunday. The FOG web administration for the power management service only allows values 0-6 in the day of the week field when setting a cron schedule. When setting the value as 0 (assuming Sunday), version 0.11.12 of the client reports the following error in the fog.log:

    19/05/2017 10:06 AM PowerManagement ERROR: Day-of-Week values must be between 1 and 7

    Now obviously I cannot set 7 in the web administration as it will not allow me to update or add a schedule. Therefore, I cannot currently shutdown computers on a Sunday. From my previous experience with cron, FOG web and the client should be able to support both values of 0 and 7 for Sunday.

  • This post is deleted!

  • I’ve updated the code.

    Please install the working branch and you should have the ability to use 0 and 7 for sundays.

    It will proper send 7 as the “sunday” if 0 was set originally too.

  • 0 = sunday in the system.

    It sets 0 as 7 automatically.

    So while it is “similar” to cron, it’s not exact. My limiters are 0-6 for DOW field.