Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: perl script in nohup running from crontab

by zentara (Archbishop)
on Sep 22, 2011 at 17:37 UTC ( [id://927428]=note: print w/replies, xml ) Need Help??


in reply to perl script in nohup running from crontab

Hi, just some thoughts:

Googling for "nohup cron scripts" reveals some discussion that nohup is useless in a cron script, because nohup is used when a program is started from a terminal session, and you don't want the program to end when the user closes the terminal. This dosn't happen with cron. There is no terminal for nohup to link to. You might want to try just using & to set it into the background. Try

my $cmd=" expect -f /root/nfs_share/SCRIPTS/ncp_run.tcl & ";
nohup may also be causing you trouble from cron by trying to create the nohup.out file, which may be troublesome with cron's restrictions.

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

Replies are listed 'Best First'.
Re^2: perl script in nohup running from crontab
by hbm (Hermit) on Sep 22, 2011 at 17:52 UTC

    nohup seemed odd to me too, though I've seen it used...

    The ampersand is dubious for the same reason - no terminal, no concept of foreground/background.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-26 00:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found