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



  • 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


  • inedo-engineer

    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



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

    Brandon


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation