# source the system specific configuration
[ -f /etc/lsbackups.conf ] && . /etc/lsbackups.conf
-if [ -n "$(find $lastbackupfile -mtime +14)" -o -n "$(cat $statusfile | grep -i incomplete)" ]; then
+minutes=$(($backupeveryXdays * 1440 - 60))
+
+if [ -n "$(find $lastbackupfile -mmin +$minutes)" -o -n "$(cat $statusfile | grep -i incomplete)" ]; then
echo "Running backups from cron..."
setsid pack-image.sh
exit 0