<?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: Scripting Crontab in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-crontab/m-p/3349687#M192243</link>
    <description>I take it there is no way to stop and start Cron through FTP?  I would like to keep away from using rcp or rlogin to perform this.</description>
    <pubDate>Wed, 04 Aug 2004 14:43:40 GMT</pubDate>
    <dc:creator>David Land</dc:creator>
    <dc:date>2004-08-04T14:43:40Z</dc:date>
    <item>
      <title>Scripting Crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-crontab/m-p/3349682#M192238</link>
      <description>I am in the process of creating a simple script to FTP over the cron file from one server to another.  However, I am having problems figuring out how to automate crontab through this script.&lt;BR /&gt;&lt;BR /&gt;Do you have any ideas on how to make this work?</description>
      <pubDate>Wed, 04 Aug 2004 13:44:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-crontab/m-p/3349682#M192238</guid>
      <dc:creator>David Land</dc:creator>
      <dc:date>2004-08-04T13:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-crontab/m-p/3349683#M192239</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;somewhat like&lt;BR /&gt;ftp -in &amp;lt;&amp;lt; EOF&lt;BR /&gt;user u1 p1&lt;BR /&gt;cd&lt;BR /&gt;dir&lt;BR /&gt;get test1&lt;BR /&gt;quit&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;look for other threads with the search machine!&lt;BR /&gt;&lt;BR /&gt;Michael&lt;BR /&gt;</description>
      <pubDate>Wed, 04 Aug 2004 14:20:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-crontab/m-p/3349683#M192239</guid>
      <dc:creator>Michael Schulte zur Sur</dc:creator>
      <dc:date>2004-08-04T14:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-crontab/m-p/3349684#M192240</link>
      <description>The only way I can thing to do this is a brute force method which has some risk if you happen to have cron jobs set to start up on the target system at that time, and that would be to do a remsh to the target system and have it do:&lt;BR /&gt;&lt;BR /&gt;/sbin/init.d/cron stop&lt;BR /&gt;/sbin/init.d/cron start.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 04 Aug 2004 14:36:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-crontab/m-p/3349684#M192240</guid>
      <dc:creator>Kent Ostby</dc:creator>
      <dc:date>2004-08-04T14:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-crontab/m-p/3349685#M192241</link>
      <description>One quick point, anything that you envoke from crontab you want to make sure you fully path all your commands. For example /usr/bin/ftp or make sure you set up your environment so it knows where to look for your binaries (PATH=$PATH:/usr/bin).&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 04 Aug 2004 14:37:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-crontab/m-p/3349685#M192241</guid>
      <dc:creator>Dave Hutton</dc:creator>
      <dc:date>2004-08-04T14:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-crontab/m-p/3349686#M192242</link>
      <description>I think I was on the same page as Michael was.  Which after rereading it, is the wrong page.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 04 Aug 2004 14:39:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-crontab/m-p/3349686#M192242</guid>
      <dc:creator>Dave Hutton</dc:creator>
      <dc:date>2004-08-04T14:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-crontab/m-p/3349687#M192243</link>
      <description>I take it there is no way to stop and start Cron through FTP?  I would like to keep away from using rcp or rlogin to perform this.</description>
      <pubDate>Wed, 04 Aug 2004 14:43:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-crontab/m-p/3349687#M192243</guid>
      <dc:creator>David Land</dc:creator>
      <dc:date>2004-08-04T14:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-crontab/m-p/3349688#M192244</link>
      <description>stopping any process using FTP is not possible under normal circumstances, but a creative way of accomplishing this is to run a cron job like every minute and checking for existence of a file, for example /var/adm/killcron. And upon existence of this file, your script can stop/kill the cron process and delete the file. The file can be uploaded using FTP. I hope this helps.</description>
      <pubDate>Wed, 04 Aug 2004 14:55:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-crontab/m-p/3349688#M192244</guid>
      <dc:creator>Mel Burslan</dc:creator>
      <dc:date>2004-08-04T14:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-crontab/m-p/3349689#M192245</link>
      <description>Okay I believe that would work, Mel.  My only question now is how do you check for the existance of that file?</description>
      <pubDate>Wed, 04 Aug 2004 15:11:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-crontab/m-p/3349689#M192245</guid>
      <dc:creator>David Land</dc:creator>
      <dc:date>2004-08-04T15:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-crontab/m-p/3349690#M192246</link>
      <description>You do not want to simply copy the crontab over because the cron daemon itself won't have a clue that you have changed the file. The cron daemon needs a kill -1 to know to reread its configuration files. The smart way to do this is through the use of the crontab command.&lt;BR /&gt;&lt;BR /&gt;I would do send your new cron file into a remsh that invokes crontab on the remote host. Crobtab reads the stdin so this is a good fit. As a bonus, crontab automatically send a kill -1 to the cron daemon.&lt;BR /&gt;</description>
      <pubDate>Wed, 04 Aug 2004 15:38:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-crontab/m-p/3349690#M192246</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-08-04T15:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-crontab/m-p/3349691#M192247</link>
      <description>David, &lt;BR /&gt;&lt;BR /&gt;an example would be :&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;if [ -a /var/adm/killcron ]&lt;BR /&gt;then&lt;BR /&gt;  rm /var/adm/killcron&lt;BR /&gt;  /sbin/init.d/cron stop&lt;BR /&gt;  sleep 1&lt;BR /&gt;  /sbin/init.d/cron start # if you want to restart it&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;put this snippet of code into a script and call this script from cron at pre-designated intervals that you wish.&lt;BR /&gt;&lt;BR /&gt;everytime you upload a file named /var/adm/killcron (change at your wish but make sure it is in a root-only access directory, unless you may have unexplained cron disappearances) using any method, ftp, scp, rcp and what-have-you, your cron will recycle on the next run of this script.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;</description>
      <pubDate>Wed, 04 Aug 2004 16:32:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-crontab/m-p/3349691#M192247</guid>
      <dc:creator>Mel Burslan</dc:creator>
      <dc:date>2004-08-04T16:32:24Z</dc:date>
    </item>
  </channel>
</rss>

