Added some tests for batch and cron functions