Schedule a job which extract files in windows system on linux box
Hi all,
I have a job which will extract zip files present in my local directories on my windows machine and later process my extracted files and insert data of the processed files in to oracle data base and later delete the processed files, for all this process i had made a job which is perfectly running. But as this is a daily process i have to do as of now i am manually kicking off this job. In working days its ok but in week ends i am facing problem, i cant go out due to this.
How to make this run when i schedule it to run on linux box. Which means i will just export the job jar file and place it in linux drives and give the path of the drive in .ksh file and schedule it on cron to run daily. But the Problem here is i am using a tSystem component to do the extraction part, so here comes the problem, tsystem is a command line prompt which will execute the windows command lines in our local system. How can this be executed on linux box
Note: The files will be on windows machine and the job should extract files present on windows directories, but schedule the job on linux box
Any ideas please? Kindly put forth your ideas so that it would be helpful to me
I am attaching the image of my job
Hi,
Haven't read your post earlier, sorry to read you can't go out because of this
I suggest you rewrite the code you use inside the tSystem component, instead of winrar.exe C:\Test\MyData.zip C:\Extraction you might use something like "tar -xzf /mount/windows/c/Test/MyData.zip ~/Extraction"
Both command perform the same unzip action I suppose, but both do it on their respective system.
By the way, why this sudden change of Windows to Linux, can't you leave your Windows machine running over the weekend and schedule the job using Windows scheduler?
Hope this helps.
Regards,
Arno
Hi Arno,
Thanks for your reply, the reason is windows is my development machine and after developing the job i will schedule the job on linux server. And as you know generally linux servers (Not only Linux box in general any server will not be shut down so in my case Linux is our server) will not be shut down and they will be running 24*7 and 365 days.
And the command which you had given will it unzip the files present in my windows c: drive when deployed on linux box? I wonder if it works and you have given a "~" for extraction what does the tilde depicts?
Hi Pavan,
The tilde ~ points to you home folder in Linux, it was just an example of how things could work. The mount to your windows drive is a sample as well, you should make sure your windows drive (which isn't shut down, but was your development machine? I'm confused...) is mounted on some mount point in your Linux server.
I think you should reconsider the job design and make the filename and file path of your zip file a context variable, so you can pass them to the job on your linux server. They might even turn out to be local once you deployed the job and run it in a production environment
Hope this helps.
Regards,
Arno