Posts Tagged by Cron

Solaris – max of 100 cron jobs

I stumbled across a limitation feature behaviour of Solaris over the weekend – by default it only allows you to run a maximum of 100 cron jobs at once. I suppose this to protect against “shooting oneself in the head”, but aaaarghhh… Reminds me why I love Monday mornings.

Anyway, the file to edit is /etc/cron.d/queuedefs, see man queuedefs.

Thanks to Solaris Tips for pointing me in the right direction.

Source keychain credentials in Perl

I use keychain for securely caching my ssh key credentials when running scripts from cron.

Here’s how to use keychain with Perl scripts:

Create a wrapper script:
source ~/.keychain/hostname-sh
run_perl_program.pl

To run a one-off command do:

system("source ~/.keychain/hostname-sh; cmd");