Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Execute db connection

by sandy1028 (Sexton)
on May 06, 2009 at 11:07 UTC ( [id://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 < date.pl 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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2024-04-23 12:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found