[opencms-dev] Scheduled job ignores specified time and runs every hour
Christian Steinert
christian at christian-steinert.de
Tue Jul 30 14:21:25 CEST 2013
Dear Michael
Thank you, thank you, thank you. Now I feel embarrassed.
I had simply assumed that the the format for opencms cronjob definitions is *exactly* identical to unix crontab entries. But RTFM would have helped.
Thanks again and all the best.
Christian
> Christian,
>
> try to use
>
> "0 23 9 * * ?"
>
> instead.
>
> Your cron expression will run on every hour, the 9th minute and the 23nd second.
>
> Kind Regards,
> Michael.
>
>>
>> We have the problem that our cron jobs run much too often. Several of
>> our jobs run once per hour even the cronjob configuration says that the
>> job should only run once per day.
>>
>> For example, I have configured a scheduled job with the standard opencms
>> class to clear the opencms log table once every day.
>> However, the job runs every hour and not at the specified time.
>>
>> The cron job definition is as follows:
>>
>> Java Class: org.opencms.scheduler.jobs.CmsRemoveOldDbLogEntriesJob
>> Cron Expression: 23 9 * * * ?
>> Reuse Instance: [ ]
>> Active: [x]
>> User name: Admin
>> Project: Offline
>> Parameter: max-age=30 days
>>
>> Based on this definition the job should run one time each day at 9:23.
>> But the logs say that the job runs instead at 8:09, 9:09, 10:09, ...
>> We have the same type of problem not only with this job but also with
>> other jobs for which it is a problem if they run too often. There is no
>> problem in the opencms log for these jobs - the jobs run and complete
>> normally.
>>
>> We are using opencms 8.5 running on Tomcat 7, Java 7u25, Mysql 5.5
>>
>> Any insights or ideas would be appreciated.
>
More information about the opencms-dev
mailing list