-batch automatically exits the sqlite command line so you don't leave an active job hanging. I use it like this in cron 0 */6 * * * (sleep 20; cd /var/www/html/ssmppt15l/ && touch sweep.txt && /usr/bin/sqlite3 -batch ':memory:' '.read sweep_ramdisk.sql') If you run /usr/bin/sqlite3 -batch ':memory:' '.read sweep_ramdisk.sql' at the cli, the sqlite will process and then exit as if you had entered the .quit command.