I am using the community submitted Windows Scheduled Task - Create to start a Windows scheduled task. It creates the task fine but it does not substitute the action path correctly. I am trying to get it to start a previously installed application so I use the variable #{Octopus.Action[Billing Data Transfer].Output.Package.FilePath}
However when my task is deploy it does not convert the variable to the file name and path.
Are you running the “Billing Data Transfer” step as part of the deployment? Any referenced steps need to be run together in order for the variable to be populated.
Thanks for getting in touch! As @ben_dixon said, the variable is referencing a step named Billing Data Transfer, if this step does not exist before the variable is being evaluated, or has a different name, then this would be causing this problem.
If you do believe this step exists and is being executed prior to the step where this variable is not evaluating, you will need to attach your logs for us to investigate deeper.
We have a documentation page on downloading the raw log file from your deployment. If you are happy to upload it here publicly, you can do so. Otherwise you are welcome to email it directly to us at support(at)octopus(dot)com.
Thanks for emailing in the log file. I have noticed however, that the variable you are referencing is not correct and most likely the cause of this issue.
You are calling: #{Octopus.Action[Billing Data Transfer].Output.Package.FilePath}
This variable does not seem to exist in Octopus. If you are trying to reference the url where Octopus extracted your package, you will need to use the following variable:
#{Octopus.Action[Billing Data Transfer].Output.Package.InstallationDirectoryPath}
Or if using a custom installation directory: #{Octopus.Action[Billing Data Transfer].Package.CustomInstallationDirectory}
I will also note that this will only output the directory where Octopus has extracted the package. If you need to reference a specific file, you will need to append it onto the end of this variable.
#{Octopus.Action[Billing Data Transfer].Output.Package.InstallationDirectoryPath}\program.exe
We have a section in our documentation on System Variables available to you in Octopus.
Would you be able to try this and let me know if it helps resolve your issue?
Thanks for the update here! You are right! I didn’t see it when looking into this. However, this variable seems to be specifically related to the Transfer a Package step.
I checked our documentation and noticed found a reference to it here.
It looks like values for these variables are only created when the Transfer a Package step is run. It does seem a little bit confusing that we would show them if there is no Transfer a Package step in your deployment process.
I may need to run this past the team and see if this is something we can make a bit less confusing in the future.
Let me know if you have any further questions here.