Task Schedular task giving 0x2f19 result when i run updater exe - task

Task Scheduler task giving 0x2f19 result when I run updater exe and it's not updating my exe new updated version

Related

PowerShell Script Runs correctly in ISE however, it fails through SCORCH Runbook Run .Net Script Activity

I am able to run Powershell script in ISE however, same script does not Run through "Run .Net Script" Activity in Orchestrator Runbook. It fails on minor errors where error action Silently continue is defined.
It is not specific to any single script. But, for all.
SCORCH Version 2019

TFS Build: stuck when running .exe

I run BUILD in TFS, and one of the steps contains executing the .exe file.
If i run this .exe file separately, on the remote PC where BUILD is running, it operates correctly and successfully.
But when it is being called from BUILD, it simply gets stuck on this stage.
I used debug mode, copied exactly the command it is running of this type:
C:\Windows\system32\cmd.exe /c "C:\Agents\Agent2.....<my path>...\my_file.exe"
Copied it, used the Win+R (run), pasted - it works perfectly.
When can't the BUILD run the .exe file?
Thanks.
I suppose because the application is trying to do something UI-y. The agent is running as a service and any application running during the build should not use the UI in any way. Anything that relies on Windows Forms, WPF or the Message Pump won't work as long as the agent isn't running Interactively.
Try running the exact command from a scheduled task, that should also allow you to test non-interactively.

How can I get a long running PreBuildEvent to output data while its running, instead of after?

I have a visual studio MVC project and I use NPM and Bower. I restore my NPM and Bower packages as part of my build process via a pre-build command line, so the people that use the project don't need to know about npm install, etc.
Unfortunately, for whatever reason, the output is not rendered to the output window until after the package restore has finished. When building a project for the first time, this can take a very long time and I don't want to leave my users hanging, waiting for visual studio to respond.
Is there a way I can set up my pre-build command line prompt to write to the output as it runs, rather than after it runs?
csproj call to run the command
<PropertyGroup>
<PreBuildEvent>
cd "$(ProjectDir)"
echo "generating output for the output window prior to running the long running process"
dir
echo "now running long running task"
call pre-build.bat $(ConfigurationName)
</PreBuildEvent>
</PropertyGroup>
As you can see, I have some debug output in there, a couple of calls to "echo" and a dir call. I would expect to see those commands output to the output window prior to the long running task, but this doesnt happen. Instead I just see the following output until after the package restore runs
1>------ Build started: Project: MyProject, Configuration: Debug Any CPU ------
Because I'm not seeing output from the echo's and the dir, I'm thinking there is either a different way to run this task, or VS / MsBuild just doesnt support showing the output I want until after the task is run. Does anyone know how to set it up to write the output as the task runs?
Use the Target & Message elements:
<Target Name="UserMessage" BeforeTargets="Build">
<Message Text="Your message here" />
</Target>

ANT how to fork task execution?

I need to fork a new process for a specific ant task. I dont see a fork attribute in the taskdef how do I do it ?
I should be clearer, I am not talking about executing ANT in a forked process:
I have an ant task X, which I need to run in a forked process. Its some third party task which i use with taskdef X and then use this way
Is there anyway to tell any that anytime i use that task please fork the process and run ?
See Running Ant via Java in the Ant manual.

Ant task to automate the start of my server and application

I want to write Ant task to automate the task of starting my server and then open Internet Explorer with the URL of my application.
Obviously I have to execute the startServer task first and then startApplication task.
But Ant is not coming out of startServer task even after starting the server to execute startApplication task.
Basically I want Ant to understand that startServer will not end and ANT has to come out of startServer task and runstartApplication task while startServer task is running in background.
My guess is that you have an exec task in startServer. Add spawn="true" to the exec. Ant will then execute the command in the background and continue without waiting for it to complete.
I agree with Aaron you can use exec to do this, you can also use waitfor to test your connection.
<exec executable="${jboss.startup.bat}" spawn="true"/>
<echo>Waiting to start</echo>
<waitfor maxwait="10" maxwaitunit="second" checkevery="5000">
<!-- try to detect when the server has started -->
<http url="${myurl}" />
</waitfor>
<echo>Started</echo>
You also need to be aware of the problems with exec'ing .bat files directly. Consult the manual page for the <exec> task for more information.

Resources