Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] How to schedule a job in Windows

Hi all,
Have an issue when scheduling a job in a batch file using Windows Scheduler. I have 5 jobs that are in my batch file. When I execute the batch from Windows it works, when Windows Scheduler executes it, it works too. The mystery I have is when I open a job in the repository (without making any changes) the next time the batch is kicked off by Windows Scheduler, it doesn't run. Anyone know why?
Also, if I do make a change to a job that is in my batch file, it will not run either, even though the patch is still the same. Any ideas how to update a job in the respository and not have to update the batch file each time?
Here's my batch file:
"C:/Program Files/Java/jre6/bin/java.exe" -Xms256M -Xmx1024M -cp C:/TOS-Win32-r20205-V3.0.2/lib/java/jtds-1.2.jar;C:/TOS-Win32-r20205-V3.0.2/lib/java/ojdbc14-10g.jar;C:/TOS-Win32-r20205-V3.0.2/workspace/.Java/classes;C:/TOS-Win32-r20205-V3.0.2/lib/java; medicalert.paymentmethodlookup_0_1.PaymentMethodLookup --context=Default
"C:/Program Files/Java/jre6/bin/java.exe" -Xms256M -Xmx1024M -cp C:/TOS-Win32-r20205-V3.0.2/lib/java/jtds-1.2.jar;C:/TOS-Win32-r20205-V3.0.2/lib/java/ojdbc14-10g.jar;C:/TOS-Win32-r20205-V3.0.2/workspace/.Java/classes;C:/TOS-Win32-r20205-V3.0.2/lib/java; medicalert.sponsorslookup_0_1.SponsorsLookup --context=Default
"C:/Program Files/Java/jre6/bin/java.exe" -Xms256M -Xmx1024M -cp C:/TOS-Win32-r20205-V3.0.2/lib/java/advancedPersistentLookupLib.jar;C:/TOS-Win32-r20205-V3.0.2/lib/java/commons-collections-3.2.jar;C:/TOS-Win32-r20205-V3.0.2/lib/java/jtds-1.2.jar;C:/TOS-Win32-r20205-V3.0.2/lib/java/ojdbc14-10g.jar;C:/TOS-Win32-r20205-V3.0.2/workspace/.Java/classes;C:/TOS-Win32-r20205-V3.0.2/lib/java; medicalert.influencerdim_0_1.InfluencerDim --context=Default
"C:/Program Files/Java/jre6/bin/java.exe" -Xms256M -Xmx1024M -cp C:/TOS-Win32-r20205-V3.0.2/lib/java/ojdbc14-10g.jar;C:/TOS-Win32-r20205-V3.0.2/workspace/.Java/classes;C:/TOS-Win32-r20205-V3.0.2/lib/java; medicalert.membersdim_0_1.MembersDim --context=Default
"C:/Program Files/Java/jre6/bin/java.exe" -Xms256M -Xmx1024M -cp C:/TOS-Win32-r20205-V3.0.2/lib/java/advancedPersistentLookupLib.jar;C:/TOS-Win32-r20205-V3.0.2/lib/java/commons-collections-3.2.jar;C:/TOS-Win32-r20205-V3.0.2/lib/java/jxl.jar;C:/TOS-Win32-r20205-V3.0.2/lib/java/ojdbc14-10g.jar;C:/TOS-Win32-r20205-V3.0.2/workspace/.Java/classes;C:/TOS-Win32-r20205-V3.0.2/lib/java; medicalert.member_states_dim_0_2.member_states_dim --context=Default
Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,
looks like you execute your job without exporting it. Export your job and set the paths according your exported files. Than it will work.
Bye
Volker

View solution in original post

20 Replies
Anonymous
Not applicable
Author

Hi,
looks like you execute your job without exporting it. Export your job and set the paths according your exported files. Than it will work.
Bye
Volker
Anonymous
Not applicable
Author

Do you have an example of an exported job would look like in a batch file?
Anonymous
Not applicable
Author

If you export your job, you could flag the option to create a bat / sh file.
There is a screenshot in 5729
Bye
Volker
_AnonymousUser
Specialist III
Specialist III

Question regarding running the batch file. It works on the machine where I installed Talend, however, for another machine, I am getting the following error message (missing .class file). I'm wondering is there something I can download to workaround this error?
H:\My Documents\Download\LAWTESTSchedule\LAWTESTSchedule\LAWTESTSchedule>java -X
ms256M -Xmx1024M -cp classpath.jar; talenddemosjava.lawtestschedule_0_1.LAWTESTS
chedule --context=Default
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version n
umber in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Anonymous
Not applicable
Author

Hello RazorSQL
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version n

Please see related 6050. You should install the same version of JDK on different machine.
Best regards
shong
_AnonymousUser
Specialist III
Specialist III

I have JDK version 1.5 instead of 1.6 where the Job was created from. However, could you let me know the link to the bits that I have install to have this run successfully? I'm getting the different error after updating JDK, so your link to the bits would help me investigate.
Exception in component tMSSqlSP_1
java.sql.SQLException: I/O Error: SSO Failed: Native SSPI library not loaded. Ch
eck the java.library.path system property.
at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:611)
at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java
:331)
at net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java
:50)
at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:178)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at talenddemosjava.lawtestschedule_0_1.LAWTESTSchedule.tMSSqlSP_1Process
(LAWTESTSchedule.java:206)
at talenddemosjava.lawtestschedule_0_1.LAWTESTSchedule.runJobInTOS(LAWTE
STSchedule.java:401)
at talenddemosjava.lawtestschedule_0_1.LAWTESTSchedule.main(LAWTESTSched
ule.java:301)
Caused by: java.io.IOException: SSO Failed: Native SSPI library not loaded. Chec
k the java.library.path system property.
at net.sourceforge.jtds.jdbc.TdsCore.sendMSLoginPkt(TdsCore.java:1894)
at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:584)
... 8 more
Anonymous
Not applicable
Author

Hello
However, could you let me know the link to the bits that I have install to have this run successfully?

Yes, after you update the JDK, it fix the first problem.Now, you have another problem is about ms sql connection, 'about Native SSPI library not loaded', see a related 7951.
Best regards

shong
Anonymous
Not applicable
Author

Hello,
What could cause error "Native SSPI library not loaded" after I have ntlmauth.dll in place?
Does it matter if Job was created on 32bit server, and now deployed to run on 64bit server?
I copied ntlmauth.dll from server that the Job was developed on to the deployed server.
Your help is appreciated!
Anonymous
Not applicable
Author

I also tried simply copy the ntlmauth.dll from x64/SSO/ from the download bits below, but still no luck with same error.
http://sourceforge.net/projects/jtds/files/jtds/1.2.4/jtds-1.2.4-dist.zip/download
Any idea?