• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

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

    Scheduled Pinned Locked Moved Solved
    Bug Reports
    2
    4
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      Adam Grieger
      last edited by

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

      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.

      1 Reply Last reply Reply Quote 0
      • Tom ElliottT
        Tom Elliott
        last edited by

        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.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • Tom ElliottT
          Tom Elliott
          last edited by

          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.

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

          1 Reply Last reply Reply Quote 0
          • A
            Adam Grieger
            last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post

            258

            Online

            12.0k

            Users

            17.3k

            Topics

            155.2k

            Posts
            Copyright © 2012-2024 FOG Project