C++ Program Executables not Running from Scheduled Tasks

Posted on 2011-10-04
Medium Priority
Last Modified: 2012-06-22
I have written a number of programs in C++ which take data from large text files and condense it into smaller files that can be uploaded to our website and used by local apps. These had been scheduled to run daily on a Windows 2003 server, and worked just fine as such. However, since we migrated to a Win 2008 Server, these programs refuse to run in task scheduler. They work if I execute them through win explorer or command line, but they either hang or return a 0x3 error from scheduled tasks. At first, I thought it had to do with the fact that the programs copy files from remote locations, but after I made everything local (the programs now only read & create files in their own directory), it still doesn't work.

I am running the tasks as an administrator, with highest privileges.

No idea what to do now.
Question by:rvfowler2
LVL 13

Accepted Solution

BCipollone earned 2000 total points
ID: 36912176
Sounds more like a DEP issue or something to do with rights.

Try This:
To troubleshoot the first task you described, you may check the following settings.

1.     Check if the task application runs under a path where log on user has the proper permission.  If not, you may add a command line like "CD c:\users\%username%\desktop" in front of the command line to start application.

2.     Make sure the account to run task scheduler is in group "log on as batch job" rights (server side). Control Panel|Admin Tools|Local Security Policy\Local Policies\User Rights Assignments"Log on as a batch job"

resource: http://social.technet.microsoft.com/Forums/en-US/winservergen/thread/933aac93-d972-4aea-adeb-1fc1fba6a4c4/


Author Closing Comment

ID: 36917734
Thanks! Turns out, the admin account didn't have permissions for the system32 dir. I didn't realize scheduled tasks started in this directory.

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question