I have a need to run a Plex 7.1 C++ Client function from a 3rd party job scheduler and report back progression status messages back to the console as standard output. I am currently using the C++ cout function (I'm happy with another method if one exists).
I can generate and run the executable and hold the command line session until it is complete and everything works fine except that I can find no way to report the running status of the job. The cout function executes but nothing appears in the console window.
The cout message is not being sent from a server function but within the client C++ portion that the .exe was created from.
i.e,
Step 1 completed at dd/mm/yyyy hh:mm:ss
Step 2 completed at dd/mm/yyyy hh:mm:ss
Step 3 completed at dd/mm/yyyy hh:mm:ss
...
Job xxxx completed at dd/mm/yyyy hh:mm:ss
I have coded the C++ source code as such and it receives a text line as a parameter.
#include "stdafx.h"
#include <iostream>
std::cout << "&(1:)\n" << std::endl;
std::cout.flush();
I have also tried changing the VC project file to define subsystem:console but still no output to the command window.
The best that I can do at present is to write to a text file and at completion pipe this file to the console within a batch script but it is too late at completion time.
Can any C++ gurus help?