Run a Bash Command a Given Number of Times

Last modified: 
Tuesday, October 20th, 2015
Topics: 
Bash

The following will call drush cron and then sleep 10 repeatedly over 20 iterations.

for n in {1..20}; do drush cron;sleep 10;done;


The operator of this site makes no claims, promises, or guarantees of the accuracy, completeness, originality, uniqueness, or even general adequacy of the contents herein and expressly disclaims liability for errors and omissions in the contents of this website.