GNU/Parallel – Run multiple commands simultaneously

GNU/Parallel is an open source tiny executable yet so powerful to run / start multiple commands at the same time. This is a handy tool when we are trying to run multiple scripts to maintain consistency of timestamp across the board.


Below is a simple file named as REST to execute Python RESTAPI scripts simultaneously

date > start.$today.array;python &>> /vin/array.$today.log; date > end.$today.array
date > start.$today.fe;python &>> /vin/fe.$today.log; date > end.$today.fe
date > start.$; python &>> /vin/be.$today.log; date > end.$
date > start.$today.diskgrp ; python &>> /vin/diskgrp.$today.log; date > end.$today.diskgrp
date > start.$ ; python &>> /vin/tp.$today.log; date > end.$

to run the above scripts in parallel we need to execute the below command

#parallel -j 5 <REST

-j switch used to run ‘n’ number of commands in parallel from the same console

***UPDATE *** As per suggestion from oletange. Above file ‘REST’ can be better written as below

parallel ‘date > start.$today.{};python {} &>> /vin/{}.$today.log; date > end.$today.{}’ ::: sym fe be dg tp

To install GNU/Parallel on Debian / Debian based OS

#apt-get install parallel



Let’s use letsencrypt

Few folks told me that while they try to access my website they get nasty message from browsers that its unsafe to browse through my website. That’s because I was using self-signed certificate to encrypt the internet traffic. I didn’t want to go with CA vendors who charge more than the cost of my #raspberrypi.

After googling got to know about letsencrypt which provides free trusted SSL certificates. I would like to thank below tech blog / link from techmint for installing letsencrypt on my pi. Only catch is that we need to renew certificate within 90 days.


To automate renewal of letencrypt (certbot) certificate we can use below script taken from the link

if ! /usr/local/letsencrypt/letsencrypt-auto certonly -tvv --keep --webroot -w <web root folder> -d > /var/log/letsencrypt/renew.log 2>&1 ; then
   echo Automated renewal failed:
   cat /var/log/letsencrypt/renew.log
   exit 1
apachectl graceful

Note: Do change the <web root folder> with actual path

Save the above script in /root folder. I’ve saved this script as

Finally, create a new crontab entry as under to run the script every 80 days. Threshold to renew Letsencrypt (certbot) certificate is 30 days.

#crontab -e <run as root>

0 0 */80 * * /root/

To check crontab entries use below command

#crontab -l <run as root>

That’s it! folks can access my website from any type of device or browser without any issues. I’ve got free trusted certificate and enabled secure and encrypted traffic while accessing my website.


Thanks much @letsencrypt and @tecmint.


Image’s courtesy: