468,536 Members | 1,540 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,536 developers. It's quick & easy.

automation of snapshot using perl script

Hi Friends,

I would apprciate, if anyone could help me out regarding coding tips for writing a perl script for automating a snapshot process. Snapshot is nothing but capturingn forms from different language database local servers like russia,japan..which are in csv file taken as input and comparing with present english database forms in our system and output it as definition file. this out put should be checkin to repository....this should be automated by perl scripts...

so, i basically need hw to start or ref materials for automation process by perl script... if any one can help me out..that would be great...i can provide more info on interest...
Aug 23 '07 #1
10 4828
KevinADC
4,059 Expert 2GB
Generally you would use the operating system to automate a process, even if the process is a perl script. 'Cron' for unix/linux boxes and 'task' for windows boxes.
Aug 24 '07 #2
Hi Kevin,

first of thanks a lot for reply. I am using solaris box. I hv to write a perl script for automation of snapshot process and call this using shell script. I would appreciate if you can help me out sending some online links for automation - for perl scripts.......so as per my understanding. the automation is done by shell script in case of unix. and the logic is in perl script...is that correct....

THANKS...
Aug 24 '07 #3
numberwhun
3,503 Expert Mod 2GB
The automation is handled by the system ( ie: running your Perl script at specific time(s) ). If you create your script and run it on Unix, you can use the Unix scheduler (CRON) to have the task run at specific days/times (that is the automation piece. On Windows, you would use the Windows Scheduler to tell Windows when to run the script.

In Cron, you would supply the scheduler the command to run, so if your Perl script requires options fed to it, you can put them in there for it to use.

You don't necessarily need to use a shell script to kick off your Perl script as Cron can just take the Perl script and kick it off. Using a shell script just adds an extra layer that isn't truly necessary.

Regards,

Jeff
Aug 24 '07 #4
KevinADC
4,059 Expert 2GB
Hi Kevin,

.......so as per my understanding. the automation is done by shell script in case of unix. and the logic is in perl script...is that correct....

THANKS...
No, the automation is done by the operating system. See Jeffs post above. Running programs using the operatng system is not a perl issue, it is an operating system issues. Goolge for "cron tutorials" to find many online resources to help set up a cron job. But first write your perl programs.
Aug 24 '07 #5
numberwhun
3,503 Expert Mod 2GB
And keep in mind that when you are writing a script that is to be run by Cron that you MUST use absolute paths in the script as it is root running the script, not you.

Regards,

Jeff
Aug 24 '07 #6
The automation is handled by the system ( ie: running your Perl script at specific time(s) ). ...
Hi,

THANKS FOR THE REPLY.....

Ok, So if i have some requirement i perl for automation . It means I should just write the logic for a particular process....like for example snapshot process in my case...so then the script is taken care by schedular to run that file at particular time....am I correct.....So I would like to know any online perl materials is there to understand logic how to start writing a perl script for any automation process........or what i should know in perl to move further......

my actual requirement is...

I have to write a perl script for snapshot process..in unix box

1)capturing forms from database as csv file....
2)passing as input to server...combining front end +backend forms...
3)getting a .def file output..
4) making a pattern..then making script from pattern...
5)taking snapshot....
6)now checking this output with current system...
7)checkin the diff to repository....

so, any automation knowlede in perl i should learn.....

If, You are interested I can send a file to you. So you know where I am struggling.....

Thanks a lot for helping me ......
Aug 24 '07 #7
numberwhun
3,503 Expert Mod 2GB
First, please bottom post. Do not top post. (ie: put your response after the quote of the post you are replying to.

Correct, the Perl script will do what you want to do. In this case, take a snapshot. The operating system scheduler will handle running the Perl script at designated time (the automation).

It sounds like you need to learn Perl in order to code your script. You may want to start with the tutorial over at tizag.com. I would also consider, if I were you, picking up "Learning Perl, 4th Edition" from O'Reilly Books.

From your list of tasks, you have A LOT going on and also a lot to figure out. We can help you understand what you don't, but please don't forget to post your code here (in code tags) so we can troubleshoot.

Regards,

Jeff
Aug 24 '07 #8
KevinADC
4,059 Expert 2GB
When we start repeating ourselves I get uninterested in continuing. If you have no working perl code then that is where you need to start. Forget the automation for now. Write some perl code that at least does your first requirement:

1)capturing forms from database as csv file....

Then build on it from there. Until you have some perl code to post I can't offer any more help.
Aug 24 '07 #9
From your list of tasks, you have A LOT going on and also a lot to figure out. We can help you understand what you don't, but please don't forget to post your code here (in code tags) so we can troubleshoot.
Jef,

Alright...I will work on it. Then I will let you know , So that you can check wheather I am in right path......Thanks a lot for your co-operation....

Thanks and regards,
Raj
Aug 24 '07 #10
When we start repeating ourselves I get uninterested in continuing. If you have no working perl code then that is where you need to start. Forget the automation for now. Write some perl code that at least does your first requirement:

1)capturing forms from database as csv file....

Then build on it from there. Until you have some perl code to post I can't offer any more help.
Kevin,

Yes kevin You are right. I was in testing before, I am new to development.
So, even before starting I want to make sure , what I know , and where I have to work....Thank you so much for your co-operation....let me work on some code....then I will let you if I got stuck..
...
Thanks & Regards,,
Raj
Aug 24 '07 #11

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Civilian_Target | last post: by
1 post views Thread by Perl Beginner | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.