For a better understanding i'm trying to replace cronjob with a daemon.
Database table (jobs) should looks like:
job_id
job_name
job_key - is the name of the task, controller or script.
job_type - (task|controller|script)
If job_type is task, daemon will open a child process and trigger task (ex: php oil refine task)
If job_type is controller, daemon will open a child process and trigger controller (job key should be the controller URL path)
If job_type is a script job_key should be script full path.
cron_set (we use it only when we want to perform tasks on a specified date)
Values looks like cronjob.
run_status (1|0)
1 - job is running
0 - job as been completed
job_created (DATETIME)
job_lastrun (DATETIME)