[opencms-dev] Scheduled job ignores specified time and runs every hour

Michael Emmerich m.emmerich at alkacon.com
Tue Jul 30 12:34:05 CEST 2013


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.

-- 
Kind Regards,
Michael.

-------------------

Michael Emmerich

Alkacon Software GmbH  - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org



More information about the opencms-dev mailing list