Not only is cron your friend in the Unix world, there is also the at command.

For completeness, it has to be said that at used to rely on an atrun command scheduled to run under cron every ten minutes, IIRC: in modern implementations it is based on an atd daemon itself instead, and atrun is a convenient script left there for compatibility.

More interestingly, it has to be said that PC's as commonly used tend not to be turned on 24/7, and thus cron (or whatever) scheduling should be tailored on the user's habits. Alternatively, I know there to exist an anacron utility, which:

is a computer program that performs periodic command scheduling which is traditionally done by cron, but without assuming that the system is running continuously. Thus, it can be used to control the execution of daily, weekly, and monthly jobs (or anything with a period of n days), on systems that don't run 24 hours a day. Anacron was originally conceived and implemented by Christian Schwarz in Perl, for the Unix operating system. The current implementation, in C, was written by Itai Tzur and is actively maintained by Sean 'Shaleh' Perry.

Unfortunately, AIUI it is not much known nor used, especially by major Linux distros, which often schedule "housekeeping" operations at times at which the computer will likely be off, instead. Incidentally and in the same vein as above, anacron is not a daemon but must be scheduled with cron - a design which I personally find entirely reasonable.

(Sorry for replying so late!)

--
If you can't understand the incipit, then please check the IPB Campaign.

In reply to Re^2: Running a perl script automatically on Mac OS X 10.5 by blazar
in thread Running a perl script automatically on Mac OS X 10.5 by Ninth Prince

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.