In PHP I create a file with a cronjob. Then I use exec('crontab <filename>') to install the job. This works fine. The job is listed within WebMin->System->Scheduled Cron Jobs.
The only problem is: the job never gets executed.
When I edit the job from within WebMin, change nothing but save it immediately, the job is getting executed fine. Suprise me!
When I look at cron-lib.pl, which is used from save_cron.cgi saving the job from within WebMin, the key difference might be that it seems jobs are pushed onto a cron_jobs_cache array.
My guess is that cron uses the cache and that the crontab command installs the job but does add the job to the cache. So, the new job never gets executed.
Is this the right conclusion? And above all, is there a solution to get the job activated to run on it's schedule from PHP?