CronJob not running

Finally I found the solution. Following is the solution:- Never use relative path in python scripts to be executed via crontab. I did something like this instead:-import os import sys import time, datetime CLASS_PATH = ‘/srv/www/live/mainapp/classes’ SETTINGS_PATH = ‘/srv/www/live/foodtrade’ sys.path.insert(0, CLASS_PATH) sys.path.insert(1,SETTINGS_PATH) import other_py_files Never supress the crontab code instead use mailserver and check the … Read more

mysql.h file can’t be found

The mysql.h file from the libmysqlclient-dev Ubuntu package is located at /usr/include/mysql/mysql.h. This is not a standard search path for compilers, however /usr/include is. You’d typically use the mysql.h header in your code like this: If you don’t want to specify the directory offset in your source, you can pass the -I flag to gcc … Read more

Speed up rsync with Simultaneous/Concurrent File Transfers?

Updated answer (Jan 2020) xargs is now the recommended tool to achieve parallel execution. It’s pre-installed almost everywhere. For running multiple rsync tasks the command would be: This will list all folders in /srv/mail, pipe them to xargs, which will read them one-by-one and and run 4 rsync processes at a time. The % char replaces the input argument for each command call. Original … Read more