org-batch-agenda

org-batch-agenda is an autoloaded Lisp macro in `org-agenda.el'.

(org-batch-agenda CMD-KEY &rest PARAMETERS)

Run an agenda command in batch mode and send the result to STDOUT.
If CMD-KEY is a string of length 1, it is used as a key in
`org-agenda-custom-commands' and triggers this command. If it is a
longer string it is used as a tags/todo match string.
Parameters are alternating variable names and values that will be bound
before running the agenda command.