XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Schedule a single non repeating task

    Scheduled Pinned Locked Moved Management
    7 Posts 4 Posters 116 Views 3 Watching
    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.
    • E Offline
      edsilber
      last edited by

      I'm trying to schedule a snapshot for 8:00 AM later this week. I've got the task created but when I go to the schedules I only get repeating cron results, I can't get it down to a single event. How can I make the equivalent of an at versus a cron.

      And another possibly dumb question, Cron syntax seems to use months 1 through 12 but the web GUI seems to generate 0-11

      D lsouai-vatesL 3 Replies Last reply Reply Quote 0
      • olivierlambertO Offline
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        Question for @lsouai-vates

        1 Reply Last reply Reply Quote 0
        • D Offline
          DustinB @edsilber
          last edited by DustinB

          @edsilber said in Schedule a single non repeating task:

          I'm trying to schedule a snapshot for 8:00 AM later this week. I've got the task created but when I go to the schedules I only get repeating cron results, I can't get it down to a single event. How can I make the equivalent of an at versus a cron.

          And another possibly dumb question, Cron syntax seems to use months 1 through 12 but the web GUI seems to generate 0-11

          You would do this like this,

          cac06c0d-d63e-40e0-9e07-5528408695ec-image.png

          04485645-2f50-45a2-b81d-b88f063babfd-image.png

          Granted this is technically every year on the same day. But you can just disable the job after the job ran.

          E 1 Reply Last reply Reply Quote 0
          • E Offline
            edsilber @DustinB
            last edited by

            @DustinB

            Question on the cron pattern results.
            Your results for cron are 0 8 28 9 * but October is selected and the sample set shows october items.
            Is this a bug or a european code set vs US code set. 0-11 for months vs 1-12?

            I might schedule via the jobs tab and cancel after
            Thanks, for now I just used at and an xe comnand from the host where the vm lives

            at now + 1 minute
            at> xe vm-snapshot vm=testvmnew-name-label="snap test" new-name-description="snap via cli"
            at> ctrl D to save

            job runs fine.

            I guess I can put in our feature request to have a single job run using AT.

            D 1 Reply Last reply Reply Quote 0
            • D Offline
              DustinB @edsilber
              last edited by

              @edsilber Yeah I'm not really sure, I also assumed that cron (and XO would use the cron pattern for months). Clearly it doesn't.

              Using AT on the CLI of your host/pool should work (I imagine). But yeah having a "Run Now" function in XO would be killer.

              1 Reply Last reply Reply Quote 0
              • lsouai-vatesL Offline
                lsouai-vates Vates 🪐 Product team XO Team @edsilber
                last edited by

                @edsilber Hello and thank you for your help! I'm currently reviewing the user interface and discussing it with the XO team. I'll get back to you as soon as I've found the best way to help you… 🙂

                1 Reply Last reply Reply Quote 0
                • lsouai-vatesL Offline
                  lsouai-vates Vates 🪐 Product team XO Team @edsilber
                  last edited by

                  @edsilber After exploring the UI, I confirmed that it's not possible to schedule a one-time cron job from the XO-5 interface.

                  We're prioritizing the development of new features for XO-6, so we'll take your suggestions regarding scheduling into account for the new interface.

                  I propose an alternative: using the REST API to run schedules by creating your own execution script (if you are on linux: https://www.veeble.com/kb/scheduling-one-time-jobs-in-linux-using-at-command/).

                  The REST API link is: {your-xo-url}/rest/v0/docs/#/schedules

                  Please feel free to contact me if you have any further questions.

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