[resolved] How to schedule a job in Windows

One Star

[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

Accepted Solutions
One Star

Re: [resolved] How to schedule a job in Windows

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

All Replies
One Star

Re: [resolved] How to schedule a job in Windows

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
One Star

Re: [resolved] How to schedule a job in Windows

Do you have an example of an exported job would look like in a batch file?
One Star

Re: [resolved] How to schedule a job in Windows

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

Re: [resolved] How to schedule a job in Windows

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)
Community Manager

Re: [resolved] How to schedule a job in Windows

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
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] How to schedule a job in Windows

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
Community Manager

Re: [resolved] How to schedule a job in Windows

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
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] How to schedule a job in Windows

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!
One Star

Re: [resolved] How to schedule a job in Windows

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?
One Star

Re: [resolved] How to schedule a job in Windows

Does the DLL require some ports to be opened to run successfully?
One Star

Re: [resolved] How to schedule a job in Windows

hi,
I downloaded the source code "JobScheduler" to change it for obtaining a frensh interface of "job scheduler object editor".
I want to know roughly what are the steps and across what is the point of entry of this project (the main class) to run it.
Regards
jockhip12
One Star

Re: [resolved] How to schedule a job in Windows

Hi
Right click on the job and go to Export Job Scripts. Specify a loc for zip file. Once exported go to the folder and click the batch file in jobName_1.0\JobName folder. Double click on the batch to run the job.
One Star

Re: [resolved] How to schedule a job in Windows

Hello,
Thank you for the answer,
I don't understand you very well.
I want to change the source code of job scheduler to obtain a French interface JOE.
I used Eclipse to open the project but when I run the project from the class Editor.java, an error appears "Editor does not contain a main type ".
Regards
jockhip12
One Star

Re: [resolved] How to schedule a job in Windows

resolved
Employee

Re: [resolved] How to schedule a job in Windows

Thanks for the feedback!
Best,
Pcoffre.
One Star

Re: [resolved] How to schedule a job in Windows

Hello,
I need to change the interface desktob "Job Scheduler Object Editor" in French.
I try to use Eclipse as IDE but the project is not running (source code is not a job scheduler eclipse project apparently).
So I tried to translate the file com.sos.scheduler.editor \ src \ sos \ scheduler \ editor \ message_en.properties French that exists in the installation directory: sos-berlin.com \ JobScheduler \ scheduler \ lib \ com.sos.scheduler.editor-1.6-1056-7749.jar.
This method worked well, but the problem thar I am facing now is the translation of the menu bar (file, options file) and sub menu (ctrl + o open, etc....) that exist in a java class in the source code of the job scheduler:

java / sos / scheduler / editor / app / MainWindow.java, not in its installation directory as the file message_en.properties.
NB: I found the file MainWindow.Class in the installation directory
sos-berlin.com \ JobScheduler \ scheduler \ lib \ com.sos.scheduler.editor-1.6-1056-7749.jar
but I can not change it because the extension is .Class.
Is it a method to modify the MainWindow .Class?
Or is there another method to translate the menu bar!
Thank you
Regards
jockhip12
One Star

Re: [resolved] How to schedule a job in Windows

how can I compile job scheduler in windows ?
I have a PDF document how to compile job scheduler english version but only for Linux.
One Star

Re: [resolved] How to schedule a job in Windows

To compile the source code of job scheduler, I created the symbolic link for java:
ln-s / opt / java java
and another for perl
ln-s / opt / perl perl
But during the compilation, the command
make / make-scheduler
returns this error
cc1plus: error: scheduler / prod / LINKS / java / include: Not a file
make: *** Error 1
and the command
make
returns this error LINKS / java / include: Not a file and / LINKS / java / include / linux: Not a file
There is a mistake when creating the link or what?
Thank you
One Star

Re: [resolved] How to schedule a job in Windows

the directory / java / include does not exist, that is why the command make / make-scheduler generates an error.
I created manually the folders and I recompiled the project.
That's what the command returns this time
]make: « libxml2.a » est à jour.
make: « libxslt.a » est à jour.
g++ ... -c -g -MD -Wall -Wno-sign-compare -Wno-long-long -Wuninitialized -DNDEBUG -O2 -m32 -DMAKE_UBUNTU -Wno-deprecated -Wno-reorder -Wno-non-virtual-dtor ../java.cxx
In file included from ../java.cxx:37:0:
../z_com.h: In function ?bool zschimmer::com::variant_is_empty(const zschimmer::com::Variant&)?:
../z_com.h:836:60: warning: suggest parentheses around ?&&? within ?||?
../java.cxx: In member function ?void zschimmer::javabridge::Vm::start()?:
../java.cxx:655:7: warning: suggest explicit braces to avoid ambiguous ?else?
../java.cxx: In function ?void zschimmer::javabridge::throw_java_ret(int, const std::string&, const std::string&)?:
../java.cxx:1147:14: error: ?JNI_ENOMEM? was not declared in this scope
../java.cxx:1148:14: error: ?JNI_EEXIST? was not declared in this scope
../java.cxx:1149:14: error: ?JNI_EINVAL? was not declared in this scope
../java.cxx: In member function ?int zschimmer::javabridge::Method::int_call(__jobject*, const zschimmer::javabridge:Smiley Tonguearameter_list&) const?:
../java.cxx:2076:92: error: invalid conversion from ?const jvalue*? to ?jvalue*?
../java.cxx:2076:92: error: initializing argument 3 of ?jint _Jv_JNIEnv::CallIntMethodA(__jobject*, _jmethodID*, jvalue*)?
../java.cxx: In member function ?__jobject* zschimmer::javabridge::Method::jobject_call(__jobject*, const zschimmer::javabridge:Smiley Tonguearameter_list&) const?:
../java.cxx:2132:99: error: invalid conversion from ?const jvalue*? to ?jvalue*?
../java.cxx:2132:99: error: initializing argument 3 of ?__jobject* _Jv_JNIEnv::CallObjectMethodA(__jobject*, _jmethodID*, jvalue*)?
../java.cxx: In member function ?std::string zschimmer::javabridge::Method::string_call(__jobject*, const zschimmer::javabridge:Smiley Tonguearameter_list&) const?:
../java.cxx:2146:106: error: invalid conversion from ?const jvalue*? to ?jvalue*?
../java.cxx:2146:106: error: initializing argument 3 of ?__jobject* _Jv_JNIEnv::CallObjectMethodA(__jobject*, _jmethodID*, jvalue*)?
../java.cxx: In member function ?int zschimmer::javabridge:Smiley Frustratedtatic_method::int_call(__jclass*, const zschimmer::javabridge:Smiley Tonguearameter_list&) const?:
../java.cxx:2248:93: error: invalid conversion from ?const jvalue*? to ?jvalue*?
../java.cxx:2248:93: error: initializing argument 3 of ?jint _Jv_JNIEnv::CallIntMethodA(__jobject*, _jmethodID*, jvalue*)?
make: *** Erreur 1
Any solution PLZ ?
One Star

Re: [resolved] How to schedule a job in Windows

hi is it possible to set the automatic time to run this job.. suppose dialy evening 5 o clock the job should run automatically and the excel values should store into database