Thanks graff,

cron is executing the script, but now i have a different problem.

I have all the scripts under /root/nfs_share/SCRIPTS folder as you can see i was trying to run a script ncp_run.tcl (which is again under SCRIPTS dir). In this ncp_run.tcl file i am socurcing some other files

source resource.conf source init.tcl

so while corn is executing the script it is throwing error
couldn't read file "resource.conf": no such file or directory while executing "source "resource.conf"" (file "/root/nfs_share/SCRIPTS/ncp_run.tcl" line 1)
so is it something like corn is running this in some other environment. here is some of the datails:

[root@perflnx14 SCRIPTS]# which crontab /usr/bin/crontab [root@perflnx14 SCRIPTS]# echo $SHELL /bin/bash [root@perflnx14 SCRIPTS]# echo $PATH /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/s +bin:/bin:/usr/sbin:/usr/bin:/root/bin:/root/nfs_share/SCRIPTS:/root/n +fs_share/SCRIPTS/ [root@perflnx14 SCRIPTS]# echo $HOME /root

but if i run this script manually  expect -f ncp_run.tcl</it will work finep> once again thanks for helping me out in this ;-)


In reply to Re^2: perl script in nohup running from crontab by tanuj
in thread perl script in nohup running from crontab by tanuj

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.