#!/bin/sh unique_append() { grep -qF "$1" "$2" || echo "$1" >> "$2" } unique_append \ '*/30 * * * * ((sleep $(($(random-numgen) % 1000)); shared-state-publish-all &> /dev/null)&)'\ /etc/crontabs/root unique_append \ '*/2 * * * * ((for dataFile in /var/shared-state/data/* ; do shared-state bleach $(basename $dataFile .json); done &> /dev/null)&)'\ /etc/crontabs/root