Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Execute db connection

by sandy1028 (Sexton)
on May 06, 2009 at 11:07 UTC ( #762222=perlquestion: print w/replies, xml ) Need Help??

sandy1028 has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I have to execute DB connection after one hour of cp command is executed. How can I execute it without cron tab
`cp $file1 $file2`; ###### ###DB connection # Statements #####

Replies are listed 'Best First'.
Re: Execute db connection
by Anonymous Monk on May 06, 2009 at 11:11 UTC
    sleep for an hour( 60 * 60)
Re: Execute db connection
by cdarke (Prior) on May 06, 2009 at 13:51 UTC
    Or use the 'at' command, which is run by crond but does not require crontab - it runs jobs as a one-off. Or use Proc::Background.
      For this file
      #!/usr/bin/perl $date = `date`; print $date;
      I had set the at command like this at -m 02:21 < But nothing got printed on the screen. How will I know that the job has been executed
        crond doesn't provide screens/terminals to watch

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://762222]
Approved by Corion
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2023-11-29 15:08 GMT
Find Nodes?
    Voting Booth?

    No recent polls found