Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    Scheduled Task is failing due to invalid script identifier

    Scheduled Pinned Locked Moved Support
    3 Posts 2 Posters 24 Views 1 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.
    • B Offline
      brandon_owensby_2976
      last edited by

      I created a scheduled task that points to an OtterScript. I created the script it is pointing to as a global script via the Administration screen. Even though I can clearly see the script and the name I keep getting the error

      System.FormatException: "Purge_Orphaned_Feature_Releases" is not a valid DeploymentScript identifier for the "global" scope.
      

      when it attempts to fire the scheduled task.

      The original name was Purge Orphaned Feature Releases but I changed it to use underscores thinking the spaces had something to do with it. I even tried prefixing it with global::. I'm hoping someone can tell me what is going on so I can get this working.

      Here is a screenshot showing the script is defined globally

      8ffd9e57-741e-4da2-8c09-8e3631d27062-image.png

      Here is a screenshot showing the current configuration for the scheduled task

      dd8e58ea-c186-42a2-8c6e-191400039c4f-image.png

      Thank you,
      Brandon

      atrippA 1 Reply Last reply Reply Quote 0
      • atrippA Offline
        atripp inedo-engineer @brandon_owensby_2976
        last edited by

        Hi @brandon_owensby_2976,

        It's a bit confusing, but the message "{name}" is not a valid DeploymentScript identifier for the "global" scope. will occur when:

        • a script is being executed in the global context (as this is case here)
        • the {name} does not start with global::

        I know you mentioned you pre-fixed with global::, but these scheduled jobs can be a bit tricky to test. It's possible that the old record (without global::) was queued up.

        To be totally certain next time, I would stop/start the service so that there's nothing that gets queued up.

        Thanks,
        Alana

        1 Reply Last reply Reply Quote 0
        • B Offline
          brandon_owensby_2976
          last edited by

          Hi Alana,
          Just wanted to let you know that restarting the service did fix the issue. Thank you for the suggestion.

          Brandon

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • 1 / 1
          • First post
            Last post
          Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation