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

    Manage scheduled task

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    3
    8
    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.
    • L
      lebrun78
      last edited by

      Hello,

      How can I managed scheduled tak, view, erase, remove, modify…

      Lebrun

      Fog Version: Fog 1.5.10
      Server OS: AlmaLinux release 8.8

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

        @lebrun78 Though I haven’t played with the API much yet (Tom is doing most of that) I’d think that DELETE URLs are a bit different - from the simplified API documentation. Have you tried the following yet?

        curl -H 'fog-api-token:NWE...MWU=' -H 'fog-user-token:ODc....mNDE=' -X DELETE http://fogus/fog/scheduledtask/86
        

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

          @lebrun78 Do you mean through the GUI or the API? What FOG Version?

          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
          • L
            lebrun78
            last edited by

            my production version is 1.4.4.
            I have had a look throught the gui (web) ? How could i get the api ?

            Fog Version: Fog 1.5.10
            Server OS: AlmaLinux release 8.8

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

              @lebrun78 You already have the API. What you need is documentation on how to use it. Here’s some:

              https://news.fogproject.org/simplified-api-documentation/
              and
              https://forums.fogproject.org/topic/10036/api
              and
              https://forums.fogproject.org/topic/9779/can-i-use-some-kind-of-script-to-create-image-and-ghost-my-lab-machines
              #wiki worthy

              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/

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

                @wayne-workman
                Thanks,
                I can get the scheduled tacks of the host with the id 826 by:

                curl -H 'fog-api-token:ttt.....WU=' -H 'fog-user-token:ODc4Z.....YjZmNDE=' -X GET http://fogus/fog/scheduledtask -o 826task.json  -d '{"hostID":[826]}'
                

                So I get the 826task.json file containing:

                { "count": 1, "scheduledtasks": [ { "id": "86", "name": "Deploy Task", "description": "", "type": "C", "taskType": "1", "minute": "0", "hour": "1", "dayOfMonth": "*", "month": "*", "dayOfWeek": "0", "isGroupTask": "", "hostID": "826", "shutdown": "1", "other1": "", "other2": "-1", "other3": "fog", "other4": "1", "other5": "", "scheduleTime": "0", "isActive": "1", "imageID": "0" } ]
                

                I try to delete the task with

                curl -H 'fog-api-token:NWE...MWU=' -H 'fog-user-token:ODc....mNDE=' -X DELETE http://fogus/fog/scheduledtask  -d '{"id":[86]}'
                

                But the task is still present… What is my error ?

                Fog Version: Fog 1.5.10
                Server OS: AlmaLinux release 8.8

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

                  @lebrun78 Though I haven’t played with the API much yet (Tom is doing most of that) I’d think that DELETE URLs are a bit different - from the simplified API documentation. Have you tried the following yet?

                  curl -H 'fog-api-token:NWE...MWU=' -H 'fog-user-token:ODc....mNDE=' -X DELETE http://fogus/fog/scheduledtask/86
                  

                  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 1
                  • L
                    lebrun78
                    last edited by

                    Yes it works, thanks,

                    May be examples are lacking in the documentation ?

                    Fog Version: Fog 1.5.10
                    Server OS: AlmaLinux release 8.8

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

                      @lebrun78 said in Manage scheduled task:

                      May be examples are lacking in the documentation ?

                      Help us write examples? Post them here.

                      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 1
                      • 1 / 1
                      • First post
                        Last post

                      311

                      Online

                      12.0k

                      Users

                      17.3k

                      Topics

                      155.2k

                      Posts
                      Copyright © 2012-2024 FOG Project