http://qs321.pair.com?node_id=11134283


in reply to Re^2: singleton lock not reliable
in thread singleton lock not reliable

> Writing a simple cyclic thingy isn't that hard.

One of the advantages of cron is it's restarted when the machine is restarted or when it crashes for whatever reason. Instead of trying to achieve the same with a cyclic thingy, I'd rather go with crontab.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^4: singleton lock not reliable
by cavac (Parson) on Jun 27, 2021 at 08:57 UTC

    Good point. I was mostly trying to point out that using a complicated solution like Docker is a bit much for such a simple problem.

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