Okay, so the obvious fix was to load my org init file as in the following:
emacs --batch --user $USER --eval "(progn (org-agenda-list nil nil 'year)
(org-icalendar-combine-agenda-files))"
Now, the wiki page at http://www.emacswiki.org/emacs/BatchMode mentinos that
packages don't get loaded,
When I try to export my agenda to ics (ical) from the command line, I use the
following command:
emacs --batch --user $USER --eval "(progn (org-agenda-list nil nil 'year)
(org-icalendar-combine-agenda-files))"
But this fails because, it says
No catch for tag: --cl-block-nil--, org-agenda