in reply to Keep n instances running

schedule a cron job that runs every 10 minutes (or whatever your time interval), checks if your n-daemon is running and starts it if it died somehow, and your n-daemon is what keeps track of how many scripts are running, starts more if one goes down -- Proc::Background, Parallel::ForkManager, ?Parallel::MPI::Simple?, ?POE::Component::Daemon?, ?Parallel::Jobs?, ?Proc::JobQueue?, ?Parallel::QueueWorker?, ?TaskForest?,