<?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 CRON &amp;amp; CRONTAB in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/cron-amp-crontab/m-p/2691855#M1389</link>
    <description>Recently starting using a script which I would like automated.&lt;BR /&gt;&lt;BR /&gt;Opened /etc/crontab and added the following:&lt;BR /&gt;&lt;BR /&gt;00,15,30,45 * * * * root /usr/xyz/script.pl&lt;BR /&gt;&lt;BR /&gt;Now when cron begins it starts the perl script but it fails to open the associated files (*.cfg, *.tmp, etc). Returns an error "no such file".&lt;BR /&gt;&lt;BR /&gt;In the directory xyz are the script, configuration, and template files all necessary to run the script.&lt;BR /&gt;&lt;BR /&gt;I have added /usr/xyz to the path statement in crontab and in ld.so.conf. Yet the error remains.&lt;BR /&gt;&lt;BR /&gt;Does someone know how to delimit the directory so that cron can execute the script.</description>
    <pubDate>Wed, 27 Mar 2002 14:15:42 GMT</pubDate>
    <dc:creator>Me_9</dc:creator>
    <dc:date>2002-03-27T14:15:42Z</dc:date>
    <item>
      <title>CRON &amp; CRONTAB</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-amp-crontab/m-p/2691855#M1389</link>
      <description>Recently starting using a script which I would like automated.&lt;BR /&gt;&lt;BR /&gt;Opened /etc/crontab and added the following:&lt;BR /&gt;&lt;BR /&gt;00,15,30,45 * * * * root /usr/xyz/script.pl&lt;BR /&gt;&lt;BR /&gt;Now when cron begins it starts the perl script but it fails to open the associated files (*.cfg, *.tmp, etc). Returns an error "no such file".&lt;BR /&gt;&lt;BR /&gt;In the directory xyz are the script, configuration, and template files all necessary to run the script.&lt;BR /&gt;&lt;BR /&gt;I have added /usr/xyz to the path statement in crontab and in ld.so.conf. Yet the error remains.&lt;BR /&gt;&lt;BR /&gt;Does someone know how to delimit the directory so that cron can execute the script.</description>
      <pubDate>Wed, 27 Mar 2002 14:15:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-amp-crontab/m-p/2691855#M1389</guid>
      <dc:creator>Me_9</dc:creator>
      <dc:date>2002-03-27T14:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: CRON &amp; CRONTAB</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-amp-crontab/m-p/2691856#M1390</link>
      <description>I had a similar problem trying to create a shell script for dyndns. The solution was to add a line that changed to the directory that contained those files and then execute the script.&lt;BR /&gt;&lt;BR /&gt;The only diff is I use crontab with the following options and keep my cron jobs in the apropriate directories.&lt;BR /&gt;&lt;BR /&gt;SHELL=/bin/bash&lt;BR /&gt;PATH=/sbin:/bin:/usr/sbin:/usr/bin&lt;BR /&gt;MAILTO=root&lt;BR /&gt;HOME=/&lt;BR /&gt;# run-parts&lt;BR /&gt;01 * * * * root run-parts /etc/cron.hourly&lt;BR /&gt;02 4 * * * root run-parts /etc/cron.daily&lt;BR /&gt;22 4 * * 0 root run-parts /etc/cron.weekly&lt;BR /&gt;42 4 1 * * root run-parts /etc/cron.monthly&lt;BR /&gt;&lt;BR /&gt;#! /bin/bash&lt;BR /&gt;# &lt;BR /&gt;# change into directory&lt;BR /&gt;cd /opt/dyndns&lt;BR /&gt;# execute script&lt;BR /&gt;ipcheck.py -l -v username password dnsaddress</description>
      <pubDate>Wed, 27 Mar 2002 16:56:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-amp-crontab/m-p/2691856#M1390</guid>
      <dc:creator>Tom Dyll</dc:creator>
      <dc:date>2002-03-27T16:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: CRON &amp; CRONTAB</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-amp-crontab/m-p/2691857#M1391</link>
      <description>You could probably learn a lot about the environment your cron account is inheriting by &lt;BR /&gt;kicking off a job "set &amp;gt; /cronenv.txt" and catting that after it runs.&lt;BR /&gt;&lt;BR /&gt;-ard</description>
      <pubDate>Thu, 28 Mar 2002 07:42:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-amp-crontab/m-p/2691857#M1391</guid>
      <dc:creator>Alan Deger</dc:creator>
      <dc:date>2002-03-28T07:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: CRON &amp; CRONTAB</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-amp-crontab/m-p/2691858#M1392</link>
      <description>Thanks, to both of you.&lt;BR /&gt;&lt;BR /&gt;The solution developed as such from your input.&lt;BR /&gt;&lt;BR /&gt;1) modify etc/crontab to read "00,15,30,45 * * * * root /usr/xyz/runscript.pl&lt;BR /&gt;&lt;BR /&gt;2) runscript.pl contained the following:&lt;BR /&gt;&lt;BR /&gt;# !/bin/bash&lt;BR /&gt;cd /usr/xyz&lt;BR /&gt;cd ./script.pl&lt;BR /&gt;&lt;BR /&gt;Now all works correctly.&lt;BR /&gt;&lt;BR /&gt;Thanks again!!</description>
      <pubDate>Thu, 28 Mar 2002 16:56:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-amp-crontab/m-p/2691858#M1392</guid>
      <dc:creator>Me_9</dc:creator>
      <dc:date>2002-03-28T16:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: CRON &amp; CRONTAB</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-amp-crontab/m-p/2691859#M1393</link>
      <description>&lt;BR /&gt;The problem is that the command lines in cron are executed directly with a shell command.&lt;BR /&gt;&lt;BR /&gt;The way to get around this (and a cleaner solution in your case) is to change the original cron entry to this:&lt;BR /&gt;&lt;BR /&gt;00,15,30,45 * * * * root /usr/bin/perl /usr/xyz/script.pl &lt;BR /&gt;&lt;BR /&gt;(provided your perl interpreter lives at /usr/bin/perl)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 28 Mar 2002 21:32:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-amp-crontab/m-p/2691859#M1393</guid>
      <dc:creator>Eric Ladner</dc:creator>
      <dc:date>2002-03-28T21:32:33Z</dc:date>
    </item>
  </channel>
</rss>

