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

    Cron style task not showing up in active tasks

    Scheduled Pinned Locked Moved
    FOG Problems
    3
    11
    4.0k
    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.
    • P
      Paul Fielder
      last edited by

      Hi, the issue with tasks is well documented, you can access your tasks if you add PHPMyAdmin to your web server then open the fog database and edit the ‘[SIZE=14px][FONT=Verdan][COLOR=#008000]scheduledTasks’ [/COLOR][/FONT][/SIZE] table. Be careful when installing phpmyadmin as it needs a password for root access setting one will break fog, until you edit the relevant files again this is also documented.

      Sorry to be vague.

      1 Reply Last reply Reply Quote 0
      • A
        astrouga
        last edited by

        I was going to suggest just editing the mysql table manually, but wasn’t sure if fog was doing something in addition at the time the task was created. Makes me wonder why there is no “edit” option.

        How comfortable are you with mysql? It is really straight-forward to alter and edit a table. Give me an example of the task and how you want it modified and I’ll give you the commands.

        astrouga

        1 Reply Last reply Reply Quote 0
        • C
          ChuckC
          last edited by

          Going to do some research.

          I see in another thread blackout said it is a planned fix for 0.33, I can just wait until then…I don’t want to try to fix something and end up breaking my server 🙂

          1 Reply Last reply Reply Quote 0
          • A
            astrouga
            last edited by

            No sweat. I was talking about manually editing the table without installing PHPMyAdmin.

            Cheers,

            astrouga

            1 Reply Last reply Reply Quote 0
            • C
              ChuckC
              last edited by

              How is that done in ubuntu?

              Just curious.

              1 Reply Last reply Reply Quote 0
              • A
                astrouga
                last edited by

                OK, you won’t get into any trouble with this. You can’t break anything or delete anything with these commands:

                [CODE]Just open a terminal window on the server, then login via:
                mysql -u root -p
                (put in the mysql password that you supplied when you installed fog)

                at the mysql propt:
                use fog;
                select * from scheduledTasks;

                If you want to see just the column headers:
                describe scheduledTasks;

                If you want to see the other tables:
                show tables;
                [/CODE]
                You can’t get into any trouble with those commands…you are just viewing. However, if you want to delete or change the times on a task, you could do something like this:

                [CODE]Assume you list out your tasks and see a task that you want to change the starting hour to 11 am. It is listed in the scheduledTasks table with the stID of 3. (stID is the primary key and is auto-incremented in this table, so it is unique).

                To update the hour (stHour in this table):
                update scheduledTasks set stHour=11 where stID=3;
                To verify that it was updated:
                select * from scheduledTasks where stID=3;

                For some reason you decide you just want to delete the whole task:
                delete from scheduledTasks where stID=3;
                To verify that it is gone:
                select * from scheduledTasks where stID=3;
                [/CODE]

                Hope that helps.

                astrouga

                1 Reply Last reply Reply Quote 0
                • C
                  ChuckC
                  last edited by

                  How can I make said commands fit the current terminal window? They’re going off the screen and looking disoriented because there are so many columns. Sorry it’s been a while since I’ve used mysql…

                  1 Reply Last reply Reply Quote 0
                  • A
                    astrouga
                    last edited by

                    Oh, you could just replace the “;” with “\G”.

                    I’m not sure if there is another way. You could probably muck around with your terminal font size too.

                    astrouga

                    1 Reply Last reply Reply Quote 0
                    • C
                      ChuckC
                      last edited by

                      Thanks.

                      Is the stGroupHostID related to which group the task is being run on?

                      I notice that two are set to stGroupHostID: 12 which is my All PCs group.

                      But one is 35 (I think because it is not linked to a group?)

                      1 Reply Last reply Reply Quote 0
                      • A
                        astrouga
                        last edited by

                        The stGroupHostID is the hostID, I believe. Look for hostID=12 in the hosts table:
                        select * from hosts where hostID=12;
                        See if that host is listed twice in the active tasks on the webpage. You should be able to look up the hostIDs in the hosts table and figure out which ones have “scheduledTasks”.

                        astruga

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

                        211

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project