--- /dev/null
+#!/bin/bash
+
+LOCKOPTS=-q
+LOCKFILE=$TMPDIR/update_org_caldav
+if [ -n "$PS1" ]; then
+ LOCKOPTS=-f;
+fi;
+LOCKIT="with-lock-ex $LOCKOPTS $LOCKFILE"
+TIMEOUT="timeout -k6m 6m"
+${LOCKIT} ${TIMEOUT} mr -d ~/projects/org-notes up;
+
+${LOCKIT} ${TIMEOUT} nice -n 19 \
+ emacs --batch --no-init -l ~/org-caldav-setup.el \
+ >/dev/null 2>&1