<?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 executing wrong file in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-executing-wrong-file/m-p/6968806#M495482</link>
    <description>&lt;P&gt;If this is truly your cron line:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;13 10 21 * * * /home/hci/test.sh &amp;gt; /tmp/log.txt 2&amp;gt; /tmp/error.txt&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have too many entries. &amp;nbsp;You have an extra * field.&lt;/P&gt;&lt;P&gt;The fields are:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MINUTE HOUR &amp;nbsp;DAY-OF-MONTH MONTH WEEKDAY COMMAND-TO-RUN.&lt;/P&gt;&lt;P&gt;for a total of 6 fields.&lt;/P&gt;&lt;P&gt;You've got&lt;/P&gt;&lt;P&gt;MINUTE-(13) HOUR-(10) DAY-OF-MONTH-(21) MONTH-(*) WEEKDAY-(*) EXTRA-(*) COMMAND&lt;/P&gt;&lt;P&gt;The extra '*' could be causing you problems. &amp;nbsp;Try removing it and see what happens.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Jun 2017 15:09:47 GMT</pubDate>
    <dc:creator>Patrick Wallek</dc:creator>
    <dc:date>2017-06-21T15:09:47Z</dc:date>
    <item>
      <title>cron executing wrong file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-executing-wrong-file/m-p/6968799#M495481</link>
      <description>&lt;P&gt;I need assistance troubleshooting a problem running a cron job on HP-UX&amp;nbsp;B.11.31. I learned that this particular entry had ceased running a few months ago and went unnoticed until this week. During troubleshooting I found that the entry was firing, yet the output seemed to be from a different script file. No matter what changes are made to the original script in question it never executes the intended commands. I've setup the cron entry to direct standard output to one file and standard error to a separate file to see what's happening as such:&lt;/P&gt;&lt;PRE&gt;13 10 21 * * * /home/hci/test.sh &amp;gt; /tmp/log.txt 2&amp;gt; /tmp/error.txt&lt;/PRE&gt;&lt;P&gt;When this entry fires, I can verify it ran by checking the log in /var/adm/cron/log and double-checking the time stamps of the output files in /tmp. It clearly ran but error.txt has output obviously from another script file in the crontab. To further prove this to myself I added a line to the other script file to touch a new file in /tmp and to output the script's file location to standard output. This time I have a new file in /tmp generated from the other script and the file location matches the script file I suspected was being run in error. Here's what I've done so far.&lt;/P&gt;&lt;P&gt;-Ran the original script manual to verify it's working as expected.&lt;/P&gt;&lt;P&gt;- Checked file permissions and ownership&lt;/P&gt;&lt;P&gt;-Renamed the original file&lt;/P&gt;&lt;P&gt;-Moved the original file&lt;/P&gt;&lt;P&gt;-Renamed and moved the original file&lt;/P&gt;&lt;P&gt;-Moved the problem entry in the crontab to another location in the file&lt;/P&gt;&lt;P&gt;-Removed execute permissions from the other script; the output simply said the file did not have execute permission&lt;/P&gt;&lt;P&gt;-Saved a copy of the crontab, removed the crontab and verified it was gone from /var/spool/cron/crontabs, reinstated the crontab&lt;/P&gt;&lt;P&gt;I am not the system administrator for this system. I've spoken to the admin about this and we are both out of ideas. Could someone please suggest next troubleshooting steps?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 14:54:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-executing-wrong-file/m-p/6968799#M495481</guid>
      <dc:creator>acroft</dc:creator>
      <dc:date>2017-06-21T14:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: cron executing wrong file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-executing-wrong-file/m-p/6968806#M495482</link>
      <description>&lt;P&gt;If this is truly your cron line:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;13 10 21 * * * /home/hci/test.sh &amp;gt; /tmp/log.txt 2&amp;gt; /tmp/error.txt&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have too many entries. &amp;nbsp;You have an extra * field.&lt;/P&gt;&lt;P&gt;The fields are:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MINUTE HOUR &amp;nbsp;DAY-OF-MONTH MONTH WEEKDAY COMMAND-TO-RUN.&lt;/P&gt;&lt;P&gt;for a total of 6 fields.&lt;/P&gt;&lt;P&gt;You've got&lt;/P&gt;&lt;P&gt;MINUTE-(13) HOUR-(10) DAY-OF-MONTH-(21) MONTH-(*) WEEKDAY-(*) EXTRA-(*) COMMAND&lt;/P&gt;&lt;P&gt;The extra '*' could be causing you problems. &amp;nbsp;Try removing it and see what happens.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 15:09:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-executing-wrong-file/m-p/6968806#M495482</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2017-06-21T15:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: cron executing wrong file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-executing-wrong-file/m-p/6968809#M495483</link>
      <description>&lt;P&gt;Indeed, that was the problem. Thank you for responding.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 15:19:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-executing-wrong-file/m-p/6968809#M495483</guid>
      <dc:creator>acroft</dc:creator>
      <dc:date>2017-06-21T15:19:08Z</dc:date>
    </item>
  </channel>
</rss>

