I am using Org mode to build a website that contains my notes on various topics, which I read on my phone on the way to work. To introduce more automation into my workflow, I would like to have crontab setup so that at the stroke of midnight (say at 11:59:59 p.m). the org mode document is exported to the html (for the website) and pdf formats.
Sure, I can open up the emacs window in terminal or gui and then export it using C-c C-e but crontab cannot do this. How can I export an org file to html / pdf through the command line. Ideally the format of the command at the terminal would be
emacs <export-command-magic> notes.org -o notes.html I know pandoc would be another solution (which allows you to convert org mode documents into HTML, but I would like to have a native Emacs solution that understands all the crufty customizations I have set up for my own org-mode, runs all the embedded source code snippets etc.)