The following successfully prevents my cacti backup script from running while data is being updated, but I would prefer it if the conditional "ps -C php -f | grep poller" wasn't continuously printing to the console. How can I accomplish this?
#wait till cron job done running:
while ps -C php -f | grep poller
do
sleep 1
done
echo "Cron job done. Starting backup"