Scheduling a job in windows from a java program.
hi all,
I have been trying to schedule a job ( creating a report) from a java application using the 'at' command. The syntax which i am using is something like this,
Runtime.getRuntime().exec("at 09:00 /EVERY java -cp C:\Vishal\lib\activation.jar;C:\Vishal\lib\adwords-0.7.jar;C:\Vishal\lib\mail.jar;C:\Vishal\; RepGen KeywordReport
where,
RepGen - is the class file to run
KeywordReport - Argument
The program runs perfectly without the 'at' command & is creating the report.
Once i use the at command , its not working.
Please can anyone help to fix this issue.
Thanks & Regards,
Vishal
[692 byte] By [
vishal_vja] at [2007-11-26 16:30:56]

Have you configured the service account on your windows system?
In the Scheduled Tasks window, click on Advanced -> AT Service Account and check if you are using a valid service account (one that has the necessary privileges to run the operation).
Try replacing the command for your java app with notepad, and see if it pops up.
Also try running your AT command from the command prompt, and see what report you get.
I run the following command from a bat-file, and it works well (provided that I set my AT Service Account first):
at 18:00 /interactive /every:Monday,Tuesday,Wednesday,Thursday,Friday javaw -jar "e:\Programs\Backinup Palace\backinup.jar" "e:\Data\System\daily_backups.xml"
The /interactive switch is needed if your program has a UI.
Yeah i am sorry , i find that advanced tab in scheduled tasks . I have changed the default AT service account to my administrative account & now my scheduler is perfectly working fine. THANKS A LOT Josef !Regards,VishalMessage was edited by: