If you have a shell account, you should be able to run crontab -e to edit your user crontab.

Just for reference, here is a low level version to execute one thing at a specific time every day (untested, from memory):

... my $targettimetext = "13:14:15"; # Turn target time into seconds my @tttparts = split/\:/, $targettimetext; my $targettime = ($tttparts[0] * 3600) + ($tttparts[1] * 60) + $tttpar +ts[2]; ... while(1) { # Turn the current time into seconds my ($sec,$min, $hour, $mday,$mon, $year, $wday,$yday, $isdst) = lo +caltime time; my $nowtime = ($hour * 3600) + ($minute * 60) + $sec; # Not yet time to do things? Sleep until it is if($nowtime < $targettime) { sleep($targettime - $nowtime); } # YOUR STUFF HERE # Recalculate the current time after doing stuff ($sec,$min, $hour, $mday,$mon, $year, $wday,$yday, $isdst) = local +time time; $nowtime = ($hour * 3600) + ($minute * 60) + $sec; # Sleep for the rest of the day sleep(86400 - $nowtime); }

Edit: Please be aware, the simplistic approach above doesn't account for all the time calculation weirdness like daylight savings time changes, leap seconds and skipped days. For that, i refer you to this excellent Tom Scott video.

perl -e 'use Crypt::Digest::SHA256 qw[sha256_hex]; print substr(sha256_hex("the Answer To Life, The Universe And Everything"), 6, 2), "\n";'

In reply to Re: Crontab replacement in Perl by cavac
in thread Crontab replacement in Perl by Anonymous Monk

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.