periodical()
Wrap a function into a periodical job.
If job_id is not provided, use function name.
trigger (str) -- 'cron' or 'interval'