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

    Scheduled tasks not running.

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    4
    9
    4.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.
    • J
      JeffD
      last edited by

      Running version 5612.

      When sheduling any task (deploy, capture, wake-up, doesn’t matter what), the task does not start up the machine(s). Without the scheduler, all these tasks work fine. I found a fix that suggests making the mysql root password blank but that didn’t help.
      The task scheduler worked fine in the past. It’s hard to tell when it stopped working because it went unused for some time. I can also use the Wake On Lan tool on my Windows machine to remotely wake up any machine so NIC settings are configured properly.

      Any suggestions?

      Thanks for your time.

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

        I don’t understand what you’re saying.

        Scheduled tasks shouldn’t start the systems that are being tasked until the tasking time is met. Is this what’s not working?

        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
        • Wayne WorkmanW
          Wayne Workman @JeffD
          last edited by

          @JeffD 99% of the time, scheduled tasks that don’t run are because your server time is off.

          Fix the time on your server, and set your timezone properly both on the server and in the FOG Web Interface.

          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
          • J
            JeffD
            last edited by JeffD

            @Tom-Elliott said:

            I don’t understand what you’re saying.

            Scheduled tasks shouldn’t start the systems that are being tasked until the tasking time is met. Is this what’s not working?

            That’s exactly what’s not working.

            @Wayne-Workman said:

            @JeffD 99% of the time, scheduled tasks that don’t run are because your server time is off.

            Fix the time on your server, and set your timezone properly both on the server and in the FOG Web Interface.

            I’ve edited /etc/php5/apache2/php.ini to include the correct timezone.
            I’ve also changed FOG_TZ_INFO in the fog settings to the correct timezone.

            If I schedule a task for 5 minutes into the future, the scheduled tasks page says that it’ll run in 5 minutes, if I keep refreshing it’ll eventually say it’ll run “seconds from now” and if I refresh for another minute it’ll show it ran “moments ago”. So the time showing on the webpage seems right. So it seems like it’s trying to run it at the time I scheduled it, but then doesn’t start up the machines to carry out the task.

            After making this thread I installed a fresh server completely from scratch (version 5612) and it doesn’t work on that either.

            Oh by the way I’m using Ubuntu Server 14.04.3 if it matters.

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

              @JeffD So what happens if you log into your FOG server via SSH and issue the date command?

              It should return with the day, month, year, and time… How accurate is it?

              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/

              J 1 Reply Last reply Reply Quote 0
              • george1421G
                george1421 Moderator
                last edited by

                It would be interesting to know what if anything is posted to the /opt/fog/log/taskscheduler.log when one of these scheduled events are missed. If its not in there, one might think one of the logs would say what just happened. This is very strange that “nothing” happens.

                You might want to check to see if the fog task scheduler service is running. I might be able to understand if the scheduler is not running. The web gui looks at the database where the scheduled task is run. It calculates when it should run and displays that to the user. So the time line is correct from the users perspective. Its just the task never kicks off on the back end. This is all speculation, but it sounds logical.

                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!

                1 Reply Last reply Reply Quote 1
                • J
                  JeffD @Wayne Workman
                  last edited by JeffD

                  I’'m now testing this on a 1.2.0 FOG server also on Ubuntu Server 14.04.3. Same problem.

                  @Wayne-Workman said:

                  @JeffD So what happens if you log into your FOG server via SSH and issue the date command?

                  It should return with the day, month, year, and time… How accurate is it?

                  Seems accurate down to the second, timezone and all.

                  @george1421 said:

                  It would be interesting to know what if anything is posted to the /opt/fog/log/taskscheduler.log when one of these scheduled events are missed. If its not in there, one might think one of the logs would say what just happened. This is very strange that “nothing” happens.

                  You might want to check to see if the fog task scheduler service is running. I might be able to understand if the scheduler is not running. The web gui looks at the database where the scheduled task is run. It calculates when it should run and displays that to the user. So the time line is correct from the users perspective. Its just the task never kicks off on the back end. This is all speculation, but it sounds logical.

                  I did not find /opt/fog/log/taskscheduler.log but I did find fogscheduler.log there. I assume this is the same thing? These are the last 10 entries.

                  
                  [12-10-15 7:51:30 am]  * 0 active task(s) awaiting check-in.
                  [12-10-15 7:51:30 am]  * No tasks found!
                  [12-10-15 7:52:30 am]  * 0 active task(s) awaiting check-in.
                  [12-10-15 7:52:30 am]  * 1 task(s) found.
                  [12-10-15 7:52:30 am]  * Task run time: Thu, 10 Dec 2015 08:51:00 +0000
                  [12-10-15 7:52:30 am]  * Task doesn't run now.
                  [12-10-15 7:53:30 am]  * 0 active task(s) awaiting check-in.
                  [12-10-15 7:53:30 am]  * No tasks found!
                  [12-10-15 7:54:30 am]  * 0 active task(s) awaiting check-in.
                  [12-10-15 7:54:30 am]  * No tasks found!
                  

                  The strange thing is I scheduled a task for 9:24am, and I looked this up at around 9:25 am. The log shows 7:52 am and there definitely weren’t any tasks planned at that time.

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

                    @JeffD it appears your sever time is off a bit then. The first thing I notice the left time which you saw as well. It is displaying 7:52 but your time is 9:25? The task run is showing as 8:52 correct? What is the output of the command date on your server and the time the scheduler is putting for the text? They should be identical.

                    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
                    • J
                      JeffD
                      last edited by

                      Okay, it’s fixed but I’m still scratching my head about it.

                      I was having an additional issue where occasionally upon rebooting the server, MySql died and I had to manually restart it.
                      I fixed it by following these instructions (The part under “Ubuntu 13.04 14.04 15.04 and higher with FOG 1.2.0”).
                      I really can’t see how that fixed it but it’s somehow working now…

                      So consider the problem solved. Thank you for your time.

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

                      262

                      Online

                      12.0k

                      Users

                      17.3k

                      Topics

                      155.2k

                      Posts
                      Copyright © 2012-2024 FOG Project