
'''

jcal => use jcal

cmq agent that will emit to a given queue with a delay.
it will of course use a database for its own use

it will need to fetch time from a centralised time server

procedure too expose:
	cron { "time": "* * * * *", "emit": [...]}
	delay {}
	interval {}

cron are async, they are not garantie to run at exact time, but they are garantie to run once time set is done, timestamp will be needed for interval
'''

import cmq, couchdb

_fiveminuteaftermidnight = '5 0 * * *'
_at14h15monfirstdayofeverymonth = '15 14 1 * *'
_at22hweekday = "0 22 * * 1-5"
_every2hintervalat23minuteseveryday = "23 0-23/2 * * *"
_everysundayat4h05m = "5 4 * * sun"

def processcron(cron, now):
	'''
	>>> processcron({'time':_fiveminuteaftermidnight,'emit:'ok'},'2015-09-13 ')

	'''
	return None
