#!usr/bin/perl

Note you're missing a slash before usr. Also, my general advice for running anything from cron is always use absolute paths for everything in the crontab, i.e. "/usr/bin/perl /path/to/script.pl".

I am not getting emails with any errors from CRON.

You may be interested in the notes I use to set up my RPis which I've published here, including how to set up postfix. These notes do require some knowledge of *NIX. (I just noticed that the Markdown doesn't seem to be rendering quite right, but if you look at the plaintext/raw version it should be more legible.)

I am using the default pi account which I believe is the RPi equivalent to root.

pi is just a regular user, but on a normal Raspbian setup it has the ability to sudo without a password.

I set up a way to SSH onto the RPi before it gets installed in its new home

This is possible with configuring port forwarding on the router, but make sure to set up something like fail2ban as I describe in the link above.


In reply to Re^2: Continuous or timed? by haukex
in thread Continuous or timed? by Bod

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.