Emacs: batch processing of org mode files via crontab
Section 14.12 of the Org manual will be a good entry point for batch execution.
Its online version can be found at http://orgmode.org/manual/Batch-execution.html.
It introduces an example using org-babel-tangle
, so you might want to replace org-babel-tangle
with your own function.
I have this in crontab:
emacs -batch -l ~/.emacs -eval '(org-batch-agenda "w")' > ~/org/aux/agenda-export.txt
This uses a custom agenda I already have set up (C-c a w
in orgmode) and exports to a text file. I then call that file via conky to display my agenda over my wallpaper.
Per the comments, you're going to want to do this via:
crontab -e
This opens up your crontab file to edit. Add the execution timeline (minute hour day-of-month month day-of-week) and the command you want to run (starting with emacs ...
) and you should be set. See the crontab man page for more details if you're not familiar).
Basically, figure out how to execute the org command successfully from the command line and then add it (prefixed with the columns telling cron when to run) via crontab -e
.