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

    Scheduled task via cronjob

    Scheduled Pinned Locked Moved
    FOG Problems
    2
    11
    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.
    • M
      Max Feldflieger
      last edited by

      We use Fog 1.1.2 on a server running Ubuntu 14.4 x64 server version. Unfortunately, the time-triggered task from the cron jobs do not work. Under scheduled task the task remains active and is not included in the active task.

      In the GUI, the following was defined 10 13 ***

      What are we doing wrong?

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

        Is the FOGScheduler service running on the FOG Server?

        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
        • M
          Max Feldflieger
          last edited by

          Yes, the FOG scheduler service is running on the FOG server. The other timed task that is set on the calendar works. Only the cron job scheduler does not work.

          Thanks for the help - yours sincerely.

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

            My only thought as to the issue is the date.timezone setting. FOG defaults the time in use to UTC if the /etc/{php5/apache2/,php}/php.ini file is not set or commented.

            A commented date.timezone looks like:
            [code];date.timezone = [/code]

            Set it to your appropriate timezone and I believe you’ll have much better success:

            Example:
            [code]date.timezone = America/New_York[/code]

            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
            • M
              Max Feldflieger
              last edited by

              The time zone in the file under / etc/php5/apache2/php.ini was from documented and the parameter to “date.timezone = Europe / Berlin” is set.

              I have read up on the subject in the forum 🙂

              Only after setting the time zone in php.ini worked the timed task on the calendar.

              The scheduled task from the cronjob works still not even.

              frank

              1 Reply Last reply Reply Quote 0
              • M
                Max Feldflieger
                last edited by

                Maybe that helps. An active cron scheduled task is not included in the active tasks.

                The Log View shows the following entries

                [CODE][07-09-14 10:03:37 am] * 0 active task(s) awaiting check-in.
                [07-09-14 10:03:37 am] * 1 task(s) found.
                [07-09-14 10:03:37 am] * Task run time: Crontab: 10 9 * * *
                [07-09-14 10:03:37 am] * Task doesn’t run now.
                [07-09-14 10:04:37 am] * 0 active task(s) awaiting check-in.
                [07-09-14 10:04:37 am] * 1 task(s) found.
                [07-09-14 10:04:37 am] * Task run time: Crontab: 10 9 * * *
                [07-09-14 10:04:37 am] * Task doesn’t run now.[/CODE]

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

                  What time are you expecting the task to run. I asked list because the Cron tells it to run at 1:10 every day

                  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
                  • M
                    Max Feldflieger
                    last edited by

                    hi there,

                    our today’s test we have found a small bug. The parameter date.timezone in php.ini is set to:

                    [PHP]date.timezone = “Europe / Berlin” [/PHP]

                    This is also the local time zone of the FOG server.

                    So does the “Schedule Delayed Deployment” correctly.

                    The time in the log view has a difference of 2 hours. The “Schedule Cron-style deployment” only works if you by 2 hours is the time in cron job in the past. WOL works with both versions.

                    many greetings

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

                      I believe you can’t have spaces.

                      Your “date.timezone” should be set to:
                      [code]date.timezone = Europe/Berlin[/code]

                      This is because it parses it as filesystem parameters. Europe / Berlin is not valid because the path doesn’t exist.

                      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
                      • M
                        Max Feldflieger
                        last edited by

                        ok, the spaces were created when entering the forum. Of course, I have entered the time zone without spaces in php.ini.

                        As I said:

                        So does the “Schedule Delayed Deployment” correctly.

                        The time in the log view has a difference of 2 hours. The “Schedule Cron-style deployment” only works if you by 2 hours is the time in cron job in the past. WOL works with both versions.

                        This is also ok if you consider that.

                        One problem is but still. When completed the task is done on client no shutdown but a reboot …!

                        When creating the task a shutdown is selected. Why might that be?

                        Max

                        1 Reply Last reply Reply Quote 0
                        • M
                          Max Feldflieger
                          last edited by

                          If scheduling a shutdown after completion of a donate task, the client reboots rather than shuts down. (fog 1.1.2 on ubuntu server 14.04)

                          Can anyone help me.

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

                          264

                          Online

                          12.0k

                          Users

                          17.3k

                          Topics

                          155.2k

                          Posts
                          Copyright © 2012-2024 FOG Project