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

    CRON style snapins

    Scheduled Pinned Locked Moved Solved
    General
    4
    10
    2.5k
    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.
    • Wayne WorkmanW
      Wayne Workman
      last edited by

      Asking because I don’t know, but what sort of behavior do CRON style repeating snapins have?

      I am thinking about scheduling a batch file to cause a shutdown at 10:00 PM each day, and I’m wondering what happens when that event is missed. Is the task stuck in task management? Or is it cleared or what?

      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!
      Daily Clean Installation Results:
      https://fogtesting.fogproject.us/
      FOG Reporting:
      https://fog-external-reporting-results.fogproject.us/

      1 Reply Last reply Reply Quote 0
      • JJ FullmerJ
        JJ Fullmer Testers
        last edited by

        Isn’t this functionality also available in the GreenFog settings?
        I’ve looked at them but never tried playing with them.

        Have you tried the FogApi powershell module? It's pretty cool IMHO
        https://github.com/darksidemilk/FogApi
        https://fogapi.readthedocs.io/en/latest/
        https://www.powershellgallery.com/packages/FogApi
        https://forums.fogproject.org/topic/12026/powershell-api-module

        1 Reply Last reply Reply Quote 1
        • Wayne WorkmanW
          Wayne Workman
          last edited by

          I’ve never played with green fog. I suppose it’s time.

          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!
          Daily Clean Installation Results:
          https://fogtesting.fogproject.us/
          FOG Reporting:
          https://fog-external-reporting-results.fogproject.us/

          1 Reply Last reply Reply Quote 0
          • S
            Sebastian Roth Moderator
            last edited by

            @Wayne-Workman I just tried setting up a cron style snapin which is not able to run (because I have the machine off the network). Those snapin tasks build up in “Active Tasks” as the client does not checkin for that task. Not sure if we should handle this differently. Should cron style tasks kill/delete unfinished old tasks?

            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

            Wayne WorkmanW 1 Reply Last reply Reply Quote 0
            • Wayne WorkmanW
              Wayne Workman @Sebastian Roth
              last edited by

              @Sebastian-Roth I’ve always thought that all tasks should be stackable, except for wiping and imaging.

              If you do an image deploy or wipe, clearly any other snapins no longer matter. But besides that, I think snapins should stack up.

              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!
              Daily Clean Installation Results:
              https://fogtesting.fogproject.us/
              FOG Reporting:
              https://fog-external-reporting-results.fogproject.us/

              1 Reply Last reply Reply Quote 0
              • S
                Sebastian Roth Moderator
                last edited by

                @Wayne-Workman But in your case the shutdown snapins would stack up forever if the machine is off already (and possibly shut it down straight after it is booted up???)

                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

                Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                • Wayne WorkmanW
                  Wayne Workman @Sebastian Roth
                  last edited by

                  @Sebastian-Roth In that case, those snapins should only run that one time, like they do now. If the moment is missed, then it’s just missed.

                  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!
                  Daily Clean Installation Results:
                  https://fogtesting.fogproject.us/
                  FOG Reporting:
                  https://fog-external-reporting-results.fogproject.us/

                  1 Reply Last reply Reply Quote 0
                  • S
                    Sebastian Roth Moderator
                    last edited by

                    @Wayne-Workman But how are we going to tell when and if it is missed? The client needs to checkin for the server to see. But how long do we wait? 10 minutes, 30 minutes, 6 hours?? I am not sure if there is a general rule we can apply. Maybe this needs to be a configuration option for every single snapin (like SNAPIN_TIMEOUT, where 0 = never and X = X minutes). @Tom-Elliott you know the code a lot better than I do. Would that be a huge change?

                    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

                    Wayne WorkmanW 1 Reply Last reply Reply Quote 1
                    • Wayne WorkmanW
                      Wayne Workman @Sebastian Roth
                      last edited by

                      @Sebastian-Roth said:

                      The client needs to checkin for the server to see. But how long do we wait?

                      FOG_SERVICE_CHECKIN_TIME

                      Whatever that is set to, plus a minute.

                      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!
                      Daily Clean Installation Results:
                      https://fogtesting.fogproject.us/
                      FOG Reporting:
                      https://fog-external-reporting-results.fogproject.us/

                      I 1 Reply Last reply Reply Quote 0
                      • I
                        ITSolutions Testers @Wayne Workman
                        last edited by

                        @Sebastian-Roth @Wayne-Workman I think an adjustable time would be nice though. Hard coding in a time might not be best for everyone, I am not a seasoned programmer but coding a field in the DB along the same lines as the FOG_SERVICE_CHECKIN_TIME to give the time a value doesn’t seem like it should be much harder. FOG_CRON_TASK_EXPIRY. Having it a global value, and not per task I think would be fine.

                        That way it could be set in a fashion of every night run this task, if task hasn’t been run in X min delete task. This would allow a task to run at anytime through the night, but expire before morning when the computer would be used.

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post

                        162

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project