<?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.d and Email in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/cron-d-and-email/m-p/4700551#M42426</link>
    <description>&amp;gt; Also, what is the printf "%s\n%s\n\n" saying?&lt;BR /&gt;&lt;BR /&gt;The printf command lets you specify formatting and other options in a standard way (it follows the C printf command.)&lt;BR /&gt;&lt;BR /&gt;What the above will do is print a string argument (%s), followed by a newline (\n), then a second string argument (%s) then two newlines (\n\n). Given the whole line, it should look like this (assuming the forum retains my spacing:&lt;BR /&gt;--&lt;BR /&gt;To:rustyfeo2@yahoo.com&lt;BR /&gt;Subject:REP RM1 LONG FS Flight Status&lt;BR /&gt;&lt;BR /&gt;&amp;lt;"then it will insert the output of nas_replicate -i -a"&amp;gt;&lt;BR /&gt;--&lt;BR /&gt;&lt;BR /&gt;This follows the RFC822 specification for email messages, so that the command output will land in the body of the email.</description>
    <pubDate>Mon, 18 Oct 2010 21:59:33 GMT</pubDate>
    <dc:creator>macosta</dc:creator>
    <dc:date>2010-10-18T21:59:33Z</dc:date>
    <item>
      <title>Cron.d and Email</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-d-and-email/m-p/4700549#M42424</link>
      <description>&lt;!--!*#--&gt;I have a linux box trying with a script that runs a report, creates a log then emails it.&lt;BR /&gt; Sendmail appears to be working fine as I can run simple "mail" commands and get emails.  I have another perl script that emails and it works fine.  I did not create either but inherited them.&lt;BR /&gt;&lt;BR /&gt;I simply added a 0, and ,20 to get to 0.7,19,20 hours added the to emails&lt;BR /&gt;&lt;BR /&gt;The Cron.d job is located in the following location and rights.&lt;BR /&gt;[admin@RM1CS0AH0368 ~]$ cd /etc/cron.d&lt;BR /&gt;[admin@RM1CS0AH0368 cron.d]$ ll&lt;BR /&gt;total 4&lt;BR /&gt;lrwxrwxrwx  1 root root  24 Apr 30 12:45 nas_sys -&amp;gt; /nas/site/cron.d/nas_sys&lt;BR /&gt;lrwxrwxrwx  1 root root  25 Apr 30 12:45 nas_user -&amp;gt; /nas/site/cron.d/nas_user&lt;BR /&gt;-rw-r--r--  1 root root 188 Apr  7  2006 sysstat&lt;BR /&gt;&lt;BR /&gt;The nas_user file is as follows:&lt;BR /&gt;[root@RM1CS0AH0368 cron.d]# cat nas_user&lt;BR /&gt;0 0 * * 0 nasadmin /nas/bin/server_date server_2 timezone -name America/Chicago &amp;gt;&amp;amp;/dev/null&lt;BR /&gt;0 0 * * 0 nasadmin /nas/bin/server_date server_3 timezone -name America/Chicago &amp;gt;&amp;amp;/dev/null&lt;BR /&gt;0 0 * * 0 nasadmin /nas/bin/server_date server_4 timezone -name America/Chicago &amp;gt;&amp;amp;/dev/null&lt;BR /&gt;20 7,19 * * * nasadmin /home/nasadmin/email/savvol_email 90 &amp;gt;/home/nasadmin/email/sv_cron.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;30 0,7,19,20 * * * nasadmin /home/nasadmin/email/repreport|/usr/sbin/sendmail -t &amp;gt;/home/nasadmin/email/repreport.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The script file is located in /home/nasadmin/email&lt;BR /&gt;&lt;BR /&gt;repreport which has the following Contents:&lt;BR /&gt;&lt;BR /&gt;printf "%s\n%s\n\n" "To:rustyfeo2@yahoo.com" "Subject:REP RM1 LONG FS Flight Status";&lt;BR /&gt; export NAS_DB=/nas;&lt;BR /&gt; /nas/bin/nas_replicate -i -a&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Here is my question:  if I edit the file under the folder /etc/cron.d/nas_user, do I have to restart the crond daemon?&lt;BR /&gt;&lt;BR /&gt;/sbin/service crond restart&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Also, what is the printf "%s\n%s\n\n" saying?&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Oct 2010 00:48:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-d-and-email/m-p/4700549#M42424</guid>
      <dc:creator>rustyfeo2</dc:creator>
      <dc:date>2010-10-18T00:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: Cron.d and Email</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-d-and-email/m-p/4700550#M42425</link>
      <description>&lt;!--!*#--&gt;&amp;gt; [...] a linux box [...]&lt;BR /&gt;&lt;BR /&gt;Not a very detailed description of anything.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] if I edit the file under the folder&lt;BR /&gt;&amp;gt; /etc/cron.d/nas_user, do I have to restart&lt;BR /&gt;&amp;gt; the crond daemon?&lt;BR /&gt;&lt;BR /&gt;      man cron&lt;BR /&gt;      man crontab&lt;BR /&gt;&lt;BR /&gt;On many UNIX systems, an advantage of using&lt;BR /&gt;"crontab -e" is that the "cron" daemon gets&lt;BR /&gt;notified that the file has been changed, so&lt;BR /&gt;it must be re-read.  If you edit one of these&lt;BR /&gt;files behind its back, then _you_ need to&lt;BR /&gt;tell the "cron" daemon to re-read its&lt;BR /&gt;configuration files.  A complete re-start&lt;BR /&gt;should do it, but a less brutal method, like,&lt;BR /&gt;say "kill -HUP" may also do it.&lt;BR /&gt;&lt;BR /&gt;On my Debian system, however, "man cron"&lt;BR /&gt;says:&lt;BR /&gt;&lt;BR /&gt;[...]&lt;BR /&gt;Additionally, cron checks each minute to see if its  spool  directory's&lt;BR /&gt;modtime  (or  the  modtime on /etc/crontab) has changed, and if it has,&lt;BR /&gt;cron will then examine the modtime on all  crontabs  and  reload  those&lt;BR /&gt;which have changed.  Thus cron need not be restarted whenever a crontab&lt;BR /&gt;file is modified.  Note that the crontab(1) command updates the modtime&lt;BR /&gt;of the spool directory whenever it changes a crontab.&lt;BR /&gt;method &lt;BR /&gt;[...]&lt;BR /&gt;&lt;BR /&gt;which makes it sound as if it's all pretty&lt;BR /&gt;automatic.</description>
      <pubDate>Mon, 18 Oct 2010 04:41:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-d-and-email/m-p/4700550#M42425</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-10-18T04:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Cron.d and Email</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-d-and-email/m-p/4700551#M42426</link>
      <description>&amp;gt; Also, what is the printf "%s\n%s\n\n" saying?&lt;BR /&gt;&lt;BR /&gt;The printf command lets you specify formatting and other options in a standard way (it follows the C printf command.)&lt;BR /&gt;&lt;BR /&gt;What the above will do is print a string argument (%s), followed by a newline (\n), then a second string argument (%s) then two newlines (\n\n). Given the whole line, it should look like this (assuming the forum retains my spacing:&lt;BR /&gt;--&lt;BR /&gt;To:rustyfeo2@yahoo.com&lt;BR /&gt;Subject:REP RM1 LONG FS Flight Status&lt;BR /&gt;&lt;BR /&gt;&amp;lt;"then it will insert the output of nas_replicate -i -a"&amp;gt;&lt;BR /&gt;--&lt;BR /&gt;&lt;BR /&gt;This follows the RFC822 specification for email messages, so that the command output will land in the body of the email.</description>
      <pubDate>Mon, 18 Oct 2010 21:59:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-d-and-email/m-p/4700551#M42426</guid>
      <dc:creator>macosta</dc:creator>
      <dc:date>2010-10-18T21:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Cron.d and Email</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cron-d-and-email/m-p/4700552#M42427</link>
      <description>Thanks I will work with this information to see if I can get head way.  I appreciate the info.</description>
      <pubDate>Mon, 18 Oct 2010 22:03:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cron-d-and-email/m-p/4700552#M42427</guid>
      <dc:creator>rustyfeo2</dc:creator>
      <dc:date>2010-10-18T22:03:31Z</dc:date>
    </item>
  </channel>
</rss>

