<?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: Regarding crontab in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997618#M777928</link>
    <description>No, the last line of your script won't put a new crontab in place.&lt;BR /&gt;&lt;BR /&gt;You'd need to either write directly to /var/spool/cron/crontabs/fcc (BAD)&lt;BR /&gt;or do an:&lt;BR /&gt;su fcc -c "crontab /tmp/tempfile"</description>
    <pubDate>Wed, 16 Aug 2006 11:16:33 GMT</pubDate>
    <dc:creator>Jonathan Fife</dc:creator>
    <dc:date>2006-08-16T11:16:33Z</dc:date>
    <item>
      <title>Regarding crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997610#M777920</link>
      <description>I need to change the unix user id fcc's  crontab from root unix user id. I want to automate these steps in a shell script and it is going to be run by root.  How do i do it?&lt;BR /&gt;&lt;BR /&gt;For changing the crontab for fcc unix user id i am going to do the below steps&lt;BR /&gt;login as fcc unix user id&lt;BR /&gt;$ crontab -l &amp;gt; tempfile&lt;BR /&gt;$ cat addfile &amp;gt;&amp;gt; tempfile&lt;BR /&gt;$ crontab tempfile&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Aug 2006 04:41:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997610#M777920</guid>
      <dc:creator>vind123</dc:creator>
      <dc:date>2006-08-16T04:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997611#M777921</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;With user "root":&lt;BR /&gt;&lt;BR /&gt;# crontab -l fcc &amp;gt; /tmp/crontab.fcc.txt&lt;BR /&gt;&lt;BR /&gt;# crontab -e root&lt;BR /&gt;&lt;BR /&gt;add crontab.fcc.txt (:r /tmp/crontab.fcc.txt)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# crontab -l root&lt;BR /&gt;&lt;BR /&gt;if ok,&lt;BR /&gt;&lt;BR /&gt;# crontab -r fcc&lt;BR /&gt;&lt;BR /&gt;rgs&lt;BR /&gt;&lt;BR /&gt;ran</description>
      <pubDate>Wed, 16 Aug 2006 04:49:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997611#M777921</guid>
      <dc:creator>rariasn</dc:creator>
      <dc:date>2006-08-16T04:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997612#M777922</link>
      <description>Sorry,&lt;BR /&gt;&lt;BR /&gt;# crontab -l fcc &amp;gt; /tmp/crontab.fcc.txt&lt;BR /&gt;&lt;BR /&gt;# cat /tmp/crontab.fcc.txt &amp;gt;&amp;gt; /var/spool/cron/crontabs/root&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ran</description>
      <pubDate>Wed, 16 Aug 2006 04:51:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997612#M777922</guid>
      <dc:creator>rariasn</dc:creator>
      <dc:date>2006-08-16T04:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997613#M777923</link>
      <description>hi,&lt;BR /&gt;how about :&lt;BR /&gt;As root:&lt;BR /&gt;cat addfile &amp;gt;&amp;gt; /var/spool/cron/crontabs/fcc&lt;BR /&gt;&lt;BR /&gt;If you use crontab tempfile as root it will change the root crontab file!&lt;BR /&gt;&lt;BR /&gt;Alternatively you can run your script with:&lt;BR /&gt;su fcc -c yourscriptname&lt;BR /&gt;&lt;BR /&gt;But ensure you specify all paths and variables required.</description>
      <pubDate>Wed, 16 Aug 2006 04:55:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997613#M777923</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-08-16T04:55:53Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997614#M777924</link>
      <description>&amp;gt;cat updatecron_fcc.sh&lt;BR /&gt;crontab -l &amp;gt; tempfile&lt;BR /&gt;cat addfile &amp;gt;&amp;gt; tempfile&lt;BR /&gt;crontab tempfile&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;In my main script run_crn_update.sh&lt;BR /&gt;echo "cron update is started"&lt;BR /&gt;su scc -c "/top1/frien/new/updatecron_fcc.sh"&lt;BR /&gt;echo "cron update is completed"&lt;BR /&gt;&lt;BR /&gt;I hope after execute the updatecron_fcc.sh script successfully only the  next line echo will get executed.  I dont know how it works. Do i need to run as nohup?&lt;BR /&gt;Hope this one will work?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Aug 2006 06:35:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997614#M777924</guid>
      <dc:creator>vind123</dc:creator>
      <dc:date>2006-08-16T06:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997615#M777925</link>
      <description>Hi,&lt;BR /&gt;I would amend to:&lt;BR /&gt;(Please note the addfile path to be added)&lt;BR /&gt;&amp;gt;cat updatecron_fcc.sh&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;/usr/bin/crontab -l &amp;gt; /tmp/tempfile&lt;BR /&gt;#Please add your path before the addfile&lt;BR /&gt;/usr/bin/cat addfile &amp;gt;&amp;gt; /tmp/tempfile&lt;BR /&gt;/usr/bin/crontab /tmp/tempfile&lt;BR /&gt;exit&lt;BR /&gt;&lt;BR /&gt;And, should it be scc or fcc root su's to ?</description>
      <pubDate>Wed, 16 Aug 2006 06:56:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997615#M777925</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-08-16T06:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997616#M777926</link>
      <description>In order to see if the changes took effect you could do a diff of the resulting crontabs.&lt;BR /&gt;&lt;BR /&gt;crontab -l fcc &amp;gt; /tmp/beforecronupd&lt;BR /&gt;echo "cron update is started"&lt;BR /&gt;su fcc -c "/top1/frien/new/updatecron_fcc.sh"&lt;BR /&gt;echo "cron update is completed"&lt;BR /&gt;crontab -l fcc &amp;gt; /tmp/aftercronupd&lt;BR /&gt;$(diff /tmp/beforecronupd /tmp/aftercronupd &amp;gt;/dev/null 2&amp;gt;&amp;amp;1) &amp;amp;&amp;amp; echo "crontab did not change" || echo "crontab changed"</description>
      <pubDate>Wed, 16 Aug 2006 08:20:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997616#M777926</guid>
      <dc:creator>Jonathan Fife</dc:creator>
      <dc:date>2006-08-16T08:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997617#M777927</link>
      <description>Login as Root and if i follow the below&lt;BR /&gt;step will it work.&lt;BR /&gt;&lt;BR /&gt;crontab -l fcc  &amp;gt; /tmp/tempfile&lt;BR /&gt;cat modifile &amp;gt;&amp;gt; /tmp/tempfile&lt;BR /&gt;crontab -l fcc tempfile</description>
      <pubDate>Wed, 16 Aug 2006 10:44:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997617#M777927</guid>
      <dc:creator>vind123</dc:creator>
      <dc:date>2006-08-16T10:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997618#M777928</link>
      <description>No, the last line of your script won't put a new crontab in place.&lt;BR /&gt;&lt;BR /&gt;You'd need to either write directly to /var/spool/cron/crontabs/fcc (BAD)&lt;BR /&gt;or do an:&lt;BR /&gt;su fcc -c "crontab /tmp/tempfile"</description>
      <pubDate>Wed, 16 Aug 2006 11:16:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997618#M777928</guid>
      <dc:creator>Jonathan Fife</dc:creator>
      <dc:date>2006-08-16T11:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997619#M777929</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;I know linux crontab has a -f option to read from a file. crontab tempfile is not going to work.&lt;BR /&gt;&lt;BR /&gt;If you are very careful, you can cat the addfile &amp;gt;&amp;gt; &lt;ACTUAL crontab="" file=""&gt;&lt;BR /&gt;&lt;BR /&gt;The actual crontab file is in /var/spool/cron&lt;BR /&gt;&lt;BR /&gt;Make a backup before you proceed.&lt;BR /&gt;&lt;BR /&gt;SEP&lt;/ACTUAL&gt;</description>
      <pubDate>Wed, 16 Aug 2006 11:59:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997619#M777929</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2006-08-16T11:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997620#M777930</link>
      <description>Hi Stephen,&lt;BR /&gt;&lt;BR /&gt;'crontab file' should install file as the crontab.&lt;BR /&gt;&lt;BR /&gt;# crontab -l fifejj &amp;gt; /tmp/mycron&lt;BR /&gt;# cat /tmp/mycron&lt;BR /&gt;* * * * * /bin/true&lt;BR /&gt;# echo "* * * * * /bin/false" &amp;gt;&amp;gt; /tmp/mycron&lt;BR /&gt;# su fifejj -c "crontab /tmp/mycron"&lt;BR /&gt;warning: commands will be executed using /usr/bin/sh&lt;BR /&gt;# crontab -l fifejj&lt;BR /&gt;* * * * * /bin/true&lt;BR /&gt;* * * * * /bin/false&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Aug 2006 12:40:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997620#M777930</guid>
      <dc:creator>Jonathan Fife</dc:creator>
      <dc:date>2006-08-16T12:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997621#M777931</link>
      <description>su fcc -c "crontab /tmp/tempfile happens to work. Thanks a lot &lt;BR /&gt;if i do a crontab -r  will it stop the cron under my unix user id? Is it a way to stop the cron?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 21 Aug 2006 07:57:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997621#M777931</guid>
      <dc:creator>vind123</dc:creator>
      <dc:date>2006-08-21T07:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997622#M777932</link>
      <description>crontab -r will remove the users crontab file, so it will effectively stop cron from doing anything for that user until a new crontab is put in place. &lt;BR /&gt;&lt;BR /&gt;Note that the when you do a crontab -r, the crontab file will be removed completely, so if you'll need it again be sure to save it off first (eg. crontab -l user &amp;gt; /home/user/my.crontab)</description>
      <pubDate>Mon, 21 Aug 2006 10:04:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997622#M777932</guid>
      <dc:creator>Jonathan Fife</dc:creator>
      <dc:date>2006-08-21T10:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997623#M777933</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Another way to effectively prevent cron from running as a particular user is to comment out every line of that user's crontab.&lt;BR /&gt;&lt;BR /&gt;PCS</description>
      <pubDate>Mon, 21 Aug 2006 10:22:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997623#M777933</guid>
      <dc:creator>spex</dc:creator>
      <dc:date>2006-08-21T10:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997624#M777934</link>
      <description>I tried the below one in my machine  as root and it's not working HP-UX 10.2. It's working in HP-UX 11.0&lt;BR /&gt;&lt;BR /&gt;crontab -l fcc &amp;gt; /tmp/tempfile&lt;BR /&gt;&lt;BR /&gt;So i changed this command to the below one&lt;BR /&gt;su fcc -c "crontab -l &amp;gt;/tmp/fcccron_old"&lt;BR /&gt;&lt;BR /&gt;It seems to be working but i got some doubts&lt;BR /&gt;when i checked the /var/crontab/cron/fcc directory. &lt;BR /&gt;&lt;BR /&gt;Before executing the "su fcc -c..." command the permission&lt;BR /&gt;happens to be below&lt;BR /&gt;-&amp;gt; cd /var/spool/cron/crontabs&lt;BR /&gt;-&amp;gt; ll&lt;BR /&gt;total 30&lt;BR /&gt;-r--------   1 adm        adm            535 Jan  4  2006 adm&lt;BR /&gt;-r--------   1 informix   informix       263 Jan  4  2006 informix&lt;BR /&gt;-r--------   1 root       fcc             19 Sep 15  2003 myd&lt;BR /&gt;-r--------   1 root       sys           1606 Apr 25 11:11 root&lt;BR /&gt;-r--------   1 fcc        fcc           9109 Jan  4  2006 fcc&lt;BR /&gt;-r--------   1 root       amotng         219 Oct 25  2005 uam40&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I checked  the fcc file under crontab directory a day after the command was run . I did see the permission of fcc file under /var/spool/cron/crontab directory. The permissions,owner and group is changed. I dontknow whether someone had changed manually the permissions and owner of fcc  file or the command had changed it. dont know whether the fcc cron will  run if the permission and owner group are like this.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ll&lt;BR /&gt;total 32&lt;BR /&gt;-r--------   1 adm        adm            535 Jan  4  2006 adm&lt;BR /&gt;-r--------   1 informix   informix       263 Jan  4  2006 informix&lt;BR /&gt;-r--------   1 root       fcc             19 Sep 15  2003 myd&lt;BR /&gt;-r--------   1 root       sys           1606 Apr 25 11:11 root&lt;BR /&gt;-rwxrwxrwx   1 fcc        fcc           9228 Aug 23 02:42 fcc&lt;BR /&gt;-r--------   1 root       amotng         219 Oct 25  2005 uam40&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The file permission ,owner are changed. Dont know how it got changed&lt;BR /&gt;&lt;BR /&gt;rwxrwxrwx   1 fcc        fcc           9228 Aug 23 02:42 fcc&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Aug 2006 07:38:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997624#M777934</guid>
      <dc:creator>vind123</dc:creator>
      <dc:date>2006-08-23T07:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997625#M777935</link>
      <description>How did you install the new crontab? If you used 'crontab file' or 'crontab &amp;lt; file' it should have kept the 100 permissions. Did you manually copy a file into the cron directory?</description>
      <pubDate>Wed, 23 Aug 2006 08:21:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997625#M777935</guid>
      <dc:creator>Jonathan Fife</dc:creator>
      <dc:date>2006-08-23T08:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997626#M777936</link>
      <description>changing the crontab by this command from shell script (root id) &lt;BR /&gt;&lt;BR /&gt;su fcc -c "crontab /tmp/fccmodcron"&lt;BR /&gt;&lt;BR /&gt;I want to know if we do this whether the permissions,owner and group will change in &lt;BR /&gt;/var/spool/cron/crontabs/fcc</description>
      <pubDate>Wed, 23 Aug 2006 11:06:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997626#M777936</guid>
      <dc:creator>vind123</dc:creator>
      <dc:date>2006-08-23T11:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997627#M777937</link>
      <description>Thanks a lot for the info</description>
      <pubDate>Thu, 07 Sep 2006 02:07:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-crontab/m-p/4997627#M777937</guid>
      <dc:creator>vind123</dc:creator>
      <dc:date>2006-09-07T02:07:25Z</dc:date>
    </item>
  </channel>
</rss>

