<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: cron failing to execute in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436953#M15249</link>
    <description>Hi Ravi,&lt;BR /&gt;&lt;BR /&gt;are the other daily scripts running ?&lt;BR /&gt;&lt;BR /&gt;I suggest that you put a mail command sendind to you a message when your script starts, as a debug actions like Vitaly Karazik said.&lt;BR /&gt;&lt;BR /&gt;I assume that you have tested your script running it for yourself (not using cron), and that it is doing it's job.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Xyko</description>
    <pubDate>Mon, 06 Dec 2004 05:54:12 GMT</pubDate>
    <dc:creator>xyko_1</dc:creator>
    <dc:date>2004-12-06T05:54:12Z</dc:date>
    <item>
      <title>cron failing to execute</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436943#M15239</link>
      <description>Hi,&lt;BR /&gt;we have RH 8.0 running clearcase server. I have written some scripts and when I scheduled it using cron (entry has been made in /etc/cron.daily),job is not at all getting executed. any body can help me.&lt;BR /&gt;(crond is running)</description>
      <pubDate>Mon, 06 Dec 2004 01:46:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436943#M15239</guid>
      <dc:creator>Ravi_8</dc:creator>
      <dc:date>2004-12-06T01:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: cron failing to execute</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436944#M15240</link>
      <description>Did you check with cron log file of /var/log/cron? It will contain execution informations of crond + scripts there. &lt;BR /&gt;&lt;BR /&gt;Try to execute the script with debug mode and check that you are using exit 0 at end.&lt;BR /&gt;&lt;BR /&gt;HTH.</description>
      <pubDate>Mon, 06 Dec 2004 01:55:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436944#M15240</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2004-12-06T01:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: cron failing to execute</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436945#M15241</link>
      <description>'/etc/cron.daily/' is a collection of scripts which gets launched at 04:02am every day.&lt;BR /&gt;&lt;BR /&gt;The files of which are placed in this directory have to be able to be executed on their own (i.e. must have #!/bin/shell or are binaries, and must be 'chmod +x'd).</description>
      <pubDate>Mon, 06 Dec 2004 02:07:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436945#M15241</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2004-12-06T02:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: cron failing to execute</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436946#M15242</link>
      <description>&lt;BR /&gt;Hi,&lt;BR /&gt;The log file shows this,&lt;BR /&gt;&lt;BR /&gt;Dec  6 11:01:00 zambezi CROND[2779]: (root) CMD (root run-parts /etc/cron.hourly)&lt;BR /&gt;Dec  6 11:47:00 zambezi crond[805]: (*system*) RELOAD (/etc/crontab)&lt;BR /&gt;Dec  6 11:47:00 zambezi crond[805]: (tmp.28731) ORPHAN (no passwd entry)&lt;BR /&gt;Dec  6 11:47:00 zambezi CROND[3091]: (root) CMD (run-parts /etc/cron.daily)&lt;BR /&gt;Dec  6 11:47:02 zambezi anacron[3260]: Updated timestamp for job `cron.daily' to 2004-12-06&lt;BR /&gt;&lt;BR /&gt;I am modifying cron.daily time to suit my requirement.&lt;BR /&gt;</description>
      <pubDate>Mon, 06 Dec 2004 02:17:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436946#M15242</guid>
      <dc:creator>Ravi_8</dc:creator>
      <dc:date>2004-12-06T02:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: cron failing to execute</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436947#M15243</link>
      <description>I don't like that ORPHAN entry, but..&lt;BR /&gt;&lt;BR /&gt;Do a simple 'ls -l' of '/etc/cron.daily/'.</description>
      <pubDate>Mon, 06 Dec 2004 03:26:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436947#M15243</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2004-12-06T03:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: cron failing to execute</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436948#M15244</link>
      <description>did root receive some mail from cron?</description>
      <pubDate>Mon, 06 Dec 2004 03:29:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436948#M15244</guid>
      <dc:creator>Vitaly Karasik_1</dc:creator>
      <dc:date>2004-12-06T03:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: cron failing to execute</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436949#M15245</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;these are the files under cron.daily&lt;BR /&gt;]$ ll&lt;BR /&gt;total 32&lt;BR /&gt;lrwxrwxrwx    1 root     root           28 Dec 17  2003 00-logwatch -&amp;gt; ../log.d/scripts/logwatch.pl&lt;BR /&gt;-rwxr-xr-x    1 root     root          135 Jul  2  2002 00webalizer&lt;BR /&gt;-rwxr-xr-x    1 root     root          276 Aug 28  2002 0anacron&lt;BR /&gt;-rwxr-xr-x    1 root     root          496 Dec  6 11:54 b4bkup&lt;BR /&gt;-rwxr-xr-x    1 root     root           51 Jun 24  2002 logrotate&lt;BR /&gt;-rwxr-xr-x    1 root     root          418 Sep  3  2002 makewhatis.cron&lt;BR /&gt;-rwxr-xr-x    1 root     root          104 Sep  4  2002 rpm&lt;BR /&gt;-rwxr-xr-x    1 root     root          137 Apr 23  2004 slocate.cron&lt;BR /&gt;-rwxr-xr-x    1 root     root          193 Jun 24  2002 tmpwatch&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Root is not receiving any mails</description>
      <pubDate>Mon, 06 Dec 2004 03:37:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436949#M15245</guid>
      <dc:creator>Ravi_8</dc:creator>
      <dc:date>2004-12-06T03:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: cron failing to execute</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436950#M15246</link>
      <description>cron.daily is system's crontab&lt;BR /&gt;&lt;BR /&gt;i prefer execute some scripts with "crontab -e", and determine execute time yourself&lt;BR /&gt;&lt;BR /&gt;good luck</description>
      <pubDate>Mon, 06 Dec 2004 03:42:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436950#M15246</guid>
      <dc:creator>KevinHu_1</dc:creator>
      <dc:date>2004-12-06T03:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: cron failing to execute</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436951#M15247</link>
      <description>What is the script you added ?&lt;BR /&gt;Can you give output for "ls -l" on linked file ../log.d/scripts/logwatch.pl ?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Fred&lt;BR /&gt;</description>
      <pubDate>Mon, 06 Dec 2004 04:01:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436951#M15247</guid>
      <dc:creator>Fred Ruffet</dc:creator>
      <dc:date>2004-12-06T04:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: cron failing to execute</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436952#M15248</link>
      <description>Ravi, can you add some debug output to you "backup" script?&lt;BR /&gt;Probbaly script runs but just doesn't do what you want?</description>
      <pubDate>Mon, 06 Dec 2004 04:05:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436952#M15248</guid>
      <dc:creator>Vitaly Karasik_1</dc:creator>
      <dc:date>2004-12-06T04:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: cron failing to execute</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436953#M15249</link>
      <description>Hi Ravi,&lt;BR /&gt;&lt;BR /&gt;are the other daily scripts running ?&lt;BR /&gt;&lt;BR /&gt;I suggest that you put a mail command sendind to you a message when your script starts, as a debug actions like Vitaly Karazik said.&lt;BR /&gt;&lt;BR /&gt;I assume that you have tested your script running it for yourself (not using cron), and that it is doing it's job.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Xyko</description>
      <pubDate>Mon, 06 Dec 2004 05:54:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436953#M15249</guid>
      <dc:creator>xyko_1</dc:creator>
      <dc:date>2004-12-06T05:54:12Z</dc:date>
    </item>
    <item>
      <title>Re: cron failing to execute</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436954#M15250</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am new to Linux world, worked extensively on HP-UX and AIX. The script used to work on AIX ( scheduled it using cron)but the same script on Linux is not working. Even the simple 'echo' is not working when i scheduled it using crontab. I don't know whether existing scheduled jobs are executing or not.</description>
      <pubDate>Mon, 06 Dec 2004 07:41:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436954#M15250</guid>
      <dc:creator>Ravi_8</dc:creator>
      <dc:date>2004-12-06T07:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: cron failing to execute</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436955#M15251</link>
      <description>Hi Ravi,&lt;BR /&gt;&lt;BR /&gt;try to specify the shell used to run the script. Normaly you don't have to do so on HP-UX nor AIX.&lt;BR /&gt;Put a first line in your script like that and try again.&lt;BR /&gt;&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Xyko</description>
      <pubDate>Mon, 06 Dec 2004 07:57:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436955#M15251</guid>
      <dc:creator>xyko_1</dc:creator>
      <dc:date>2004-12-06T07:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: cron failing to execute</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436956#M15252</link>
      <description>Hi xyko&lt;BR /&gt;&lt;BR /&gt;I have specified the shell and everything.&lt;BR /&gt;</description>
      <pubDate>Mon, 06 Dec 2004 07:59:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436956#M15252</guid>
      <dc:creator>Ravi_8</dc:creator>
      <dc:date>2004-12-06T07:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: cron failing to execute</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436957#M15253</link>
      <description>So it may be a porting issue...&lt;BR /&gt;&lt;BR /&gt;Sorry Xyko, but bash shouldn't be used. Try to use /bin/sh instead. It is linked to bash, but, executed through this link, it will act as a posix SH. This will probably be better.&lt;BR /&gt;&lt;BR /&gt;Could you post your shell script here and errors at runtime ? It would help resolving problems.&lt;BR /&gt;&lt;BR /&gt;Another point (when shell will work) is that cron is not setting environment. So you will have to put in cron a wrapper to this shell, first placing env then call your script. Other way is to use "su - user -c job" (even for root) to set env.&lt;BR /&gt;&lt;BR /&gt;Note that preceding post is right. It is more common to use crontab than those system jobs to schedule jobs.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Fred&lt;BR /&gt;</description>
      <pubDate>Mon, 06 Dec 2004 08:04:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436957#M15253</guid>
      <dc:creator>Fred Ruffet</dc:creator>
      <dc:date>2004-12-06T08:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: cron failing to execute</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436958#M15254</link>
      <description>Hi Fred,&lt;BR /&gt;thank's for your comment.&lt;BR /&gt;&lt;BR /&gt;Living and learning with friends.... that's the best part of our job.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;Xyko</description>
      <pubDate>Mon, 06 Dec 2004 08:11:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436958#M15254</guid>
      <dc:creator>xyko_1</dc:creator>
      <dc:date>2004-12-06T08:11:15Z</dc:date>
    </item>
    <item>
      <title>Re: cron failing to execute</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436959#M15255</link>
      <description>AFAIK,&lt;BR /&gt;&lt;BR /&gt;if  root doesn't receive email with error message from cron - cron job finished without errors.&lt;BR /&gt;&lt;BR /&gt;I've checked cron right now by adding my script  &lt;BR /&gt;to /etc/cron.daily directory and it works!&lt;BR /&gt;&lt;BR /&gt;My script is:&lt;BR /&gt;&lt;BR /&gt;echo "test" &amp;gt;/tmp/kkk</description>
      <pubDate>Mon, 06 Dec 2004 08:16:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436959#M15255</guid>
      <dc:creator>Vitaly Karasik_1</dc:creator>
      <dc:date>2004-12-06T08:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: cron failing to execute</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436960#M15256</link>
      <description>Xyko,&lt;BR /&gt;&lt;BR /&gt;Sorry if I'm a bit rude in my posts. I need to progress in english ;-)&lt;BR /&gt;&lt;BR /&gt;Vitaly,&lt;BR /&gt;&lt;BR /&gt;Wait for Ravi to post his script. Apparently it does not work on command line. Echo is working in cron as long as it is implemented in shell. Default PATH for cron jobs is null. "When a crontab command is run, this crontab  runs it with /bin/sh and sets up only three environment variables: USER, HOME, and SHELL" (man crontab).&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Fred&lt;BR /&gt;</description>
      <pubDate>Mon, 06 Dec 2004 08:34:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436960#M15256</guid>
      <dc:creator>Fred Ruffet</dc:creator>
      <dc:date>2004-12-06T08:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: cron failing to execute</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436961#M15257</link>
      <description>Fred, you're right - problems with environment is typical for cron tasks in UNIXes.&lt;BR /&gt;&lt;BR /&gt;A small corection - all scripts under /etc/cron.* dirs have /sbin:/bin:/usr/bin:usr/sbin in PATH.</description>
      <pubDate>Mon, 06 Dec 2004 08:47:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436961#M15257</guid>
      <dc:creator>Vitaly Karasik_1</dc:creator>
      <dc:date>2004-12-06T08:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: cron failing to execute</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436962#M15258</link>
      <description>Hi Guys, &lt;BR /&gt;&lt;BR /&gt;here is my script, which will lock all VOB's in the clearcase and stops it, and I have scheduled Veritas to backup all the VOB's.&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;cleartool lock vob:/vob/adminvob&lt;BR /&gt;cleartool lock vob:/vob/testing&lt;BR /&gt;cleartool lock vob:/vob/testvob&lt;BR /&gt;cleartool lock vob:/vob/rambo&lt;BR /&gt;cleartool lock vob:/vob/Fcat&lt;BR /&gt;/opt/rational/clearcase/etc/clearcase stop&lt;BR /&gt;echo " Clearcase case ready to backup"&lt;BR /&gt;&lt;BR /&gt;pls post your opinions, i will get back to you tomorrow as my wife already calling me home&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 06 Dec 2004 08:59:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-failing-to-execute/m-p/3436962#M15258</guid>
      <dc:creator>Ravi_8</dc:creator>
      <dc:date>2004-12-06T08:59:51Z</dc:date>
    </item>
  </channel>
</rss>

