I'm kind of lost on this one. I have a few DBs running on a Postgres instance, on a production machine with Windows Server 2008, and I want to schedule backups to the databases.
All I need are periodic dumps of the database. So I created a small .NET app, that loads a configuration file with the necessary data to locate each DB and a path to save the dump file. And this works well and as expected if I execute it manually through the command line. I get The necessary feedback, and the dump files are created. The application creates the command arguments dynamicly, and the database password is set in an enviroment variable before being executed:
Command Args: -ibv -Z3 -f "C:\Users\Administrator\Desktop\FlamingoRepo\BackupFiles\Cisne\Cisne20100311_104423.backup" -Fc -h localhost -U postgres -p 5432 Cisne
The problem occurs when I try to execute the same app from the TaskScheduler. I setup the scheduler to execute the app's .exe, and the history tab says it is executed and what not, but no file is created. And This is what I can't figure out. I scheduled the task as an Administrator (using the account I was logged in with), marked the checkbox related to highest privelages, and what not, but I still don't get any output (i.e. backup files), even though the history tab will say that it was executed and completed (in recent attempts, I'm not even getting any info in the history tab..). I've tried this on two machines (one standard and one with R2) with the same result.
Any suggestions would be apreciated!