<?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: Cronjob in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/cronjob/m-p/3240585#M173597</link>
    <description>Some Notes:&lt;BR /&gt;&lt;BR /&gt;The cron daemon is started during the system boot process and executes time scheduled jobs.&lt;BR /&gt;# ps -ef | grep crom # is cron running?&lt;BR /&gt;# cron # start the cron daemon, if it isn't currently running&lt;BR /&gt;&lt;BR /&gt;Jobs are submitted to cron with crontab command. Root controls who can use crontab through /var/adm/cron/cron.allow file.&lt;BR /&gt;&lt;BR /&gt;If cron.allow does not exist then /var/adm/cron/cron.deny is checked to determine if the user should be denied access. If both exist, cron.allow takes precedence. If neither file exists, only root is allowed to submit a job.&lt;BR /&gt;An empty cron.deny file allows all to use crontab. &lt;BR /&gt;&lt;BR /&gt;Each user that is using the cron daemon should have a cron configuration file in the /var/spool/cron/crontabs directory. The cron daemon consults the files in this directory to determine which jobs should be executed when A % character in the command field (unless escaped by \) is translated as a new-line character.&lt;BR /&gt;&lt;BR /&gt;You must redirect standard output and standard error of your commands. If you don't, any output generated will be mailed to you. Examples:&lt;BR /&gt;&lt;BR /&gt;# min hour date month day command&lt;BR /&gt;# 0-59 0-23 1-31 1-12 0-6 be sure to redirect output!&lt;BR /&gt;0 * * * * /usr/bin/date &amp;gt;/dev/console&lt;BR /&gt;0 6 1,15 * * &amp;gt;/var/adm/btmp &lt;BR /&gt;0 5 * * 1-5 /usr/bin/who | /usr/bin/lp&lt;BR /&gt;&lt;BR /&gt;Always use full path names for commands and files names, since cron uses only the standard environment of /usr/bin/sh and doesn't know about your environment.&lt;BR /&gt;# crontab -e # edit and submit a cron file&lt;BR /&gt;# crontab -l # view your cron file&lt;BR /&gt;# crontab -r # remove all your scheduled cron jobs.&lt;BR /&gt;&lt;BR /&gt;By default crontab opens the user's own cron file. However system administrator can modify any user's cron file by command: crontab -e user1&lt;BR /&gt;&lt;BR /&gt;Cron log file /var/adm/cron/log should be checked and emptied regularly. Although the files in /var/spool/cron/crontabs can be viewed with ls and cat, they should never be edited or removed. Doing so can leave the cron daemon in an undefined state.&lt;BR /&gt;Always use the crontab command when making changes to scheduled cron jobs.&lt;BR /&gt;&lt;BR /&gt;sks &lt;BR /&gt;</description>
    <pubDate>Tue, 06 Apr 2004 00:42:37 GMT</pubDate>
    <dc:creator>Sanjay Kumar Suri</dc:creator>
    <dc:date>2004-04-06T00:42:37Z</dc:date>
    <item>
      <title>Cronjob</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cronjob/m-p/3240578#M173590</link>
      <description>Hi All,&lt;BR /&gt;  can anyone help me in setting cron job on HP-UX server.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Krishna&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 06 Apr 2004 00:21:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cronjob/m-p/3240578#M173590</guid>
      <dc:creator>harikrishna</dc:creator>
      <dc:date>2004-04-06T00:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Cronjob</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cronjob/m-p/3240579#M173591</link>
      <description>Below I run a script called diskspace.sh&lt;BR /&gt;The first are are the minutes of the hour. The second 7-18 which means I want to only run it between the hours of 7AM and 6PM (24 hour clock). The next is the day of the month, the number of the Month  and finally the Weekday.&lt;BR /&gt;&lt;BR /&gt;1,16,31,46 7-18 * * 1-5 /techsupp/util/diskspace.sh -e"sysadmin"&lt;BR /&gt;&lt;BR /&gt;The idea of cron is to run the job only. All variables, commands etc are embedded in the script or program</description>
      <pubDate>Tue, 06 Apr 2004 00:30:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cronjob/m-p/3240579#M173591</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2004-04-06T00:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: Cronjob</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cronjob/m-p/3240580#M173592</link>
      <description>Just do a &lt;BR /&gt;$crontab -e&lt;BR /&gt;&lt;BR /&gt;Then add the entry to the crontab file as stated earlier.&lt;BR /&gt;&lt;BR /&gt;30 * * * * /opt/diskmon.sh&lt;BR /&gt;&lt;BR /&gt;30 * * * * fields denote,&lt;BR /&gt;&lt;BR /&gt;minute     The minute of the hour, 0-59 hour       The hour of the day, 0-23&lt;BR /&gt;monthday   The day of the month, 1-31&lt;BR /&gt;month      The month of the year, 1-12&lt;BR /&gt;weekday    The day of the week, 0-6, 0=Sunday&lt;BR /&gt;&lt;BR /&gt;So above I am running a script every thirty minutes all thru' the year.&lt;BR /&gt;&lt;BR /&gt;check man crontab</description>
      <pubDate>Tue, 06 Apr 2004 00:34:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cronjob/m-p/3240580#M173592</guid>
      <dc:creator>T G Manikandan</dc:creator>
      <dc:date>2004-04-06T00:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: Cronjob</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cronjob/m-p/3240581#M173593</link>
      <description>Hi ,&lt;BR /&gt;  thanks for your reply.But I know the syntax of cron,i don't know where to set the cron.can please send me where and how we will send the cron job of my script&lt;BR /&gt;&lt;BR /&gt;Thanks for your help.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Hari Krishna</description>
      <pubDate>Tue, 06 Apr 2004 00:36:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cronjob/m-p/3240581#M173593</guid>
      <dc:creator>harikrishna</dc:creator>
      <dc:date>2004-04-06T00:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: Cronjob</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cronjob/m-p/3240582#M173594</link>
      <description>Krishna,&lt;BR /&gt;The steps you need to follow in setting up a cronjob are as follows&lt;BR /&gt;&lt;BR /&gt;1. crontab -e&lt;BR /&gt;   &lt;BR /&gt;2. scroll down to the last line and insert&lt;BR /&gt;   a line&lt;BR /&gt;&lt;BR /&gt;3. Then as per Michael's instructions &lt;BR /&gt;   submit your script&lt;BR /&gt;&lt;BR /&gt;4. The typical entry on the line that&lt;BR /&gt;   you inserted will look something like &lt;BR /&gt;   what Michael has illustrated nicely&lt;BR /&gt;&lt;BR /&gt;1,16,31,46 7-18 * * 1-5 /techsupp/util/diskspace.sh -e"sysadmin"&lt;BR /&gt; &lt;BR /&gt;where diskspace.sh is your script and other descriptions are as mentioned by Micahel in the post prior to this&lt;BR /&gt;&lt;BR /&gt;Let us know if you have any questions&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;Mobeen</description>
      <pubDate>Tue, 06 Apr 2004 00:36:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cronjob/m-p/3240582#M173594</guid>
      <dc:creator>Mobeen_1</dc:creator>
      <dc:date>2004-04-06T00:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: Cronjob</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cronjob/m-p/3240583#M173595</link>
      <description>Please, have a good read of both the 'cron' man page and 'crontab' man page. From this and the instructions we have given you, you should be okay.</description>
      <pubDate>Tue, 06 Apr 2004 00:39:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cronjob/m-p/3240583#M173595</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2004-04-06T00:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: Cronjob</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cronjob/m-p/3240584#M173596</link>
      <description>Hi Mobeen,&lt;BR /&gt;  Thanks for your response.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks once again to all&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Krishna</description>
      <pubDate>Tue, 06 Apr 2004 00:42:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cronjob/m-p/3240584#M173596</guid>
      <dc:creator>harikrishna</dc:creator>
      <dc:date>2004-04-06T00:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: Cronjob</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cronjob/m-p/3240585#M173597</link>
      <description>Some Notes:&lt;BR /&gt;&lt;BR /&gt;The cron daemon is started during the system boot process and executes time scheduled jobs.&lt;BR /&gt;# ps -ef | grep crom # is cron running?&lt;BR /&gt;# cron # start the cron daemon, if it isn't currently running&lt;BR /&gt;&lt;BR /&gt;Jobs are submitted to cron with crontab command. Root controls who can use crontab through /var/adm/cron/cron.allow file.&lt;BR /&gt;&lt;BR /&gt;If cron.allow does not exist then /var/adm/cron/cron.deny is checked to determine if the user should be denied access. If both exist, cron.allow takes precedence. If neither file exists, only root is allowed to submit a job.&lt;BR /&gt;An empty cron.deny file allows all to use crontab. &lt;BR /&gt;&lt;BR /&gt;Each user that is using the cron daemon should have a cron configuration file in the /var/spool/cron/crontabs directory. The cron daemon consults the files in this directory to determine which jobs should be executed when A % character in the command field (unless escaped by \) is translated as a new-line character.&lt;BR /&gt;&lt;BR /&gt;You must redirect standard output and standard error of your commands. If you don't, any output generated will be mailed to you. Examples:&lt;BR /&gt;&lt;BR /&gt;# min hour date month day command&lt;BR /&gt;# 0-59 0-23 1-31 1-12 0-6 be sure to redirect output!&lt;BR /&gt;0 * * * * /usr/bin/date &amp;gt;/dev/console&lt;BR /&gt;0 6 1,15 * * &amp;gt;/var/adm/btmp &lt;BR /&gt;0 5 * * 1-5 /usr/bin/who | /usr/bin/lp&lt;BR /&gt;&lt;BR /&gt;Always use full path names for commands and files names, since cron uses only the standard environment of /usr/bin/sh and doesn't know about your environment.&lt;BR /&gt;# crontab -e # edit and submit a cron file&lt;BR /&gt;# crontab -l # view your cron file&lt;BR /&gt;# crontab -r # remove all your scheduled cron jobs.&lt;BR /&gt;&lt;BR /&gt;By default crontab opens the user's own cron file. However system administrator can modify any user's cron file by command: crontab -e user1&lt;BR /&gt;&lt;BR /&gt;Cron log file /var/adm/cron/log should be checked and emptied regularly. Although the files in /var/spool/cron/crontabs can be viewed with ls and cat, they should never be edited or removed. Doing so can leave the cron daemon in an undefined state.&lt;BR /&gt;Always use the crontab command when making changes to scheduled cron jobs.&lt;BR /&gt;&lt;BR /&gt;sks &lt;BR /&gt;</description>
      <pubDate>Tue, 06 Apr 2004 00:42:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cronjob/m-p/3240585#M173597</guid>
      <dc:creator>Sanjay Kumar Suri</dc:creator>
      <dc:date>2004-04-06T00:42:37Z</dc:date>
    </item>
  </channel>
</rss>

