<?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: getting specific cron dates in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/getting-specific-cron-dates/m-p/4984673#M99951</link>
    <description>Thanks for your help chaps,&lt;BR /&gt;&lt;BR /&gt;James, muchas gracias - my issue was I copied your solution and pasted to my script however in my haste I managed to add # cat sats.&lt;BR /&gt;&lt;BR /&gt;This works - brilliant!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Mr Law</description>
    <pubDate>Mon, 12 Jun 2006 08:59:44 GMT</pubDate>
    <dc:creator>lawrenzo_1</dc:creator>
    <dc:date>2006-06-12T08:59:44Z</dc:date>
    <item>
      <title>getting specific cron dates</title>
      <link>https://community.hpe.com/t5/operating-system-linux/getting-specific-cron-dates/m-p/4984665#M99943</link>
      <description>Hello everyone,&lt;BR /&gt;&lt;BR /&gt;our cronlog cron has over 700 jobs in the schedule, I want to find every job that starts after 20:00 on the server on a saturday.&lt;BR /&gt;&lt;BR /&gt;possible strings= "*", "1-6" "5"&lt;BR /&gt;&lt;BR /&gt;I have some idea how to do this but could someone suggest a solution please?&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Mon, 12 Jun 2006 05:42:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/getting-specific-cron-dates/m-p/4984665#M99943</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2006-06-12T05:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: getting specific cron dates</title>
      <link>https://community.hpe.com/t5/operating-system-linux/getting-specific-cron-dates/m-p/4984666#M99944</link>
      <description>Hi Lawrenzo:&lt;BR /&gt;&lt;BR /&gt;Try this:&lt;BR /&gt;&lt;BR /&gt;# cat ./sats&lt;BR /&gt;#!/usr/bin/perl -an&lt;BR /&gt;next if /\s*#/;&lt;BR /&gt;next unless $F[1]=~/20/ or $F[1] &amp;gt; 20 or $F[1] eq "\*";&lt;BR /&gt;next unless $F[4]=~/6/  or $F[4] eq "\*";&lt;BR /&gt;print;&lt;BR /&gt;1;&lt;BR /&gt;&lt;BR /&gt;Run as:&lt;BR /&gt;&lt;BR /&gt;# crontab -l | ./sats&lt;BR /&gt;&lt;BR /&gt;This finds crontasks that are not commented-out; and are run on Saturday (day=6) or everyday of the week every hour, after 2000 hours or in a range including 2000 hours.&lt;BR /&gt;&lt;BR /&gt;Note that Perl counts zero-relative.  Hence, $F[1] is the *second* crontab field.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 12 Jun 2006 06:43:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/getting-specific-cron-dates/m-p/4984666#M99944</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-06-12T06:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: getting specific cron dates</title>
      <link>https://community.hpe.com/t5/operating-system-linux/getting-specific-cron-dates/m-p/4984667#M99945</link>
      <description>Hi James,&lt;BR /&gt;&lt;BR /&gt;Thanks for the help, I am not familiar with perl so unable to troubleshoot - here is the output:&lt;BR /&gt;&lt;BR /&gt;--&amp;gt; crontab -l |./sats&lt;BR /&gt;+ ./sats&lt;BR /&gt;+ crontab -l&lt;BR /&gt;./sats[3]: next:  not found.&lt;BR /&gt;./sats[4]: next:  not found.&lt;BR /&gt;./sats[5]: next:  not found.&lt;BR /&gt;&lt;BR /&gt;./sats[7]: 1: 0403-006 Execute permission denied.&lt;BR /&gt;&lt;BR /&gt;permissions are 777 on the file - owned and run by root&lt;BR /&gt;</description>
      <pubDate>Mon, 12 Jun 2006 07:22:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/getting-specific-cron-dates/m-p/4984667#M99945</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2006-06-12T07:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: getting specific cron dates</title>
      <link>https://community.hpe.com/t5/operating-system-linux/getting-specific-cron-dates/m-p/4984668#M99946</link>
      <description>Lawrenzo,&lt;BR /&gt;&lt;BR /&gt;Are you only interested in jobs running from 20:00 until 23:59 Saturday night, or are you also interested in some jobs which run early Sunday morning?&lt;BR /&gt;&lt;BR /&gt;PCS</description>
      <pubDate>Mon, 12 Jun 2006 07:23:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/getting-specific-cron-dates/m-p/4984668#M99946</guid>
      <dc:creator>spex</dc:creator>
      <dc:date>2006-06-12T07:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: getting specific cron dates</title>
      <link>https://community.hpe.com/t5/operating-system-linux/getting-specific-cron-dates/m-p/4984669#M99947</link>
      <description>Try this:&lt;BR /&gt;&lt;BR /&gt;# crontab -l &lt;USER&gt; | ./sats&lt;BR /&gt;&lt;BR /&gt;PCS&lt;/USER&gt;</description>
      <pubDate>Mon, 12 Jun 2006 07:25:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/getting-specific-cron-dates/m-p/4984669#M99947</guid>
      <dc:creator>spex</dc:creator>
      <dc:date>2006-06-12T07:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: getting specific cron dates</title>
      <link>https://community.hpe.com/t5/operating-system-linux/getting-specific-cron-dates/m-p/4984670#M99948</link>
      <description>Hi (again) Lawrenzo:&lt;BR /&gt;&lt;BR /&gt;Are you sure that your included the "shebang" (#!) line that declares the Perl interpreter?&lt;BR /&gt;&lt;BR /&gt;You may need to change the location for Perl to match your server.  Do:&lt;BR /&gt;&lt;BR /&gt;# whereis perl&lt;BR /&gt;# which perl&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 12 Jun 2006 07:29:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/getting-specific-cron-dates/m-p/4984670#M99948</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-06-12T07:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: getting specific cron dates</title>
      <link>https://community.hpe.com/t5/operating-system-linux/getting-specific-cron-dates/m-p/4984671#M99949</link>
      <description># which perl&lt;BR /&gt;&lt;BR /&gt;/usr/bin/perl&lt;BR /&gt;&lt;BR /&gt;and is the same in the script&lt;BR /&gt;&lt;BR /&gt;any idea James?&lt;BR /&gt;&lt;BR /&gt;Ty&lt;BR /&gt;</description>
      <pubDate>Mon, 12 Jun 2006 08:37:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/getting-specific-cron-dates/m-p/4984671#M99949</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2006-06-12T08:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: getting specific cron dates</title>
      <link>https://community.hpe.com/t5/operating-system-linux/getting-specific-cron-dates/m-p/4984672#M99950</link>
      <description>Hi Lawrenzo:&lt;BR /&gt;&lt;BR /&gt;Well, if you cut-and-pasted the script I posted, there should only be six lines whereas the errors suggest that you have seven.&lt;BR /&gt;&lt;BR /&gt;What do these show?&lt;BR /&gt;&lt;BR /&gt;# ls -l /usr/bin/perl&lt;BR /&gt;# /usr/bin/perl -v&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 12 Jun 2006 08:43:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/getting-specific-cron-dates/m-p/4984672#M99950</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-06-12T08:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: getting specific cron dates</title>
      <link>https://community.hpe.com/t5/operating-system-linux/getting-specific-cron-dates/m-p/4984673#M99951</link>
      <description>Thanks for your help chaps,&lt;BR /&gt;&lt;BR /&gt;James, muchas gracias - my issue was I copied your solution and pasted to my script however in my haste I managed to add # cat sats.&lt;BR /&gt;&lt;BR /&gt;This works - brilliant!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Mr Law</description>
      <pubDate>Mon, 12 Jun 2006 08:59:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/getting-specific-cron-dates/m-p/4984673#M99951</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2006-06-12T08:59:44Z</dc:date>
    </item>
  </channel>
</rss>

