chilbs Posted October 7, 2014 Posted October 7, 2014 I have used another thread to create a VB script that creates an xml file ready to be inputted into command reporter. I then wrote a .bat file that runs command reporter with the xml file and the other details that command reporter needs. I can run the bat file successfully if I run it however I cannot get a scheduled task to run it. Does anyone else schedule reports using command reporter that can shed some light on how they do it. Many Thanks Chilbs
vikpaw Posted October 7, 2014 Posted October 7, 2014 What if you get the task to run as the user you used when you did it manually.
linkazoid Posted October 7, 2014 Posted October 7, 2014 I've also had problems with this on Server 2012
rpwillis Posted October 8, 2014 Posted October 8, 2014 Are you using a fully qualified path for the output file? if not, and not setting the working directory then I think the sceduler will be trying to save it in System32, which is likely to be write protected. 1
David_Grashoff Posted October 8, 2014 Posted October 8, 2014 Some great suggestions above. Some from me A user running a scheduled task must have logon as batch privileges. The user running the task must have permissions to access both the location of SIMS and the associated files referenced in the call. Any reliance on mapped drives are unwise because a scheduled task may or may not complete the login script before it fires the task. Good luck. 1
chilbs Posted October 9, 2014 Author Posted October 9, 2014 I am using the full local path for command reporter and the full UNC path for both the output and the XML
chilbs Posted October 10, 2014 Author Posted October 10, 2014 Still banging my head against a brick wall with this one. seems to do with how windows server deals with batch files.
vikpaw Posted October 12, 2014 Posted October 12, 2014 I just checked my old task, it was on server 2008 R2, so may behave differently. I actually ran the command reporter .exe directly, so it might be worth trying that, rather than through a batch file. Or try a simpler batch file, that does a straight forward dos command, rather than run command reporter, to try and isolate where the issue lies. It's disabled now, but i was running under the admin account (I think this was just to make sure it could write to the remote server.), with highest privileges. Set to run even if user not logged on. the parameters were as below: /servername:sims\sims /databasename:mysims /user:me /password:not_telling_you /report:"BISJ - Oliver5 Export +" /output:"\\svr-oliver\f$\Program Files (x86)\Softlink International\Library Server\UserDefinedLocations\newstudents.csv" i'm pretty sure you can supply the required xml params in this way too. 1
chilbs Posted October 24, 2014 Author Posted October 24, 2014 got this working in the way described in previous post. There were a couple of gotchas that I missed but going back to it fresh after leaving it a week helped.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now