codelibs / fess

Fess is very powerful and easily deployable Enterprise Search Server.
https://fess.codelibs.org
Apache License 2.0
993 stars 166 forks source link

Cron job format follows unix pattern - not an issue - Just information while scheduling crawl jobs #1107

Closed ramaghattu closed 7 years ago

ramaghattu commented 7 years ago

This is just an information which can be added later to the documentation for scheduling crawl jobs and respective Unix formats it follows. Internally, the library used for scheduling jobs is cron4j. Hence the following format should be used below:

A UNIX crontab-like pattern is a string split in five space separated parts. Each part is intented as: Minutes sub-pattern. During which minutes of the hour should the task been launched? The values range is from 0 to 59. Hours sub-pattern. During which hours of the day should the task been launched? The values range is from 0 to 23. Days of month sub-pattern. During which days of the month should the task been launched? The values range is from 1 to 31. The special value L can be used to recognize the last day of month. Months sub-pattern. During which months of the year should the task been launched? The values range is from 1 (January) to 12 (December), otherwise this sub-pattern allows the aliases "jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov" and "dec". Days of week sub-pattern. During which days of the week should the task been launched? The values range is from 0 (Sunday) to 6 (Saturday), otherwise this sub-pattern allows the aliases "sun", "mon", "tue", "wed", "thu", "fri" and "sat". The star wildcard character is also admitted, indicating "every minute of the hour", "every hour of the day", "every day of the month", "every month of the year" and "every day of the week", according to the sub-pattern in which it is used. Once the scheduler is started, a task will be launched when the five parts in its scheduling pattern will be true at the same time. Some examples: 5 This pattern causes a task to be launched once every hour, at the begin of the fifth minute (00:05, 01:05, 02:05 etc.).


This pattern causes a task to be launched every minute.

ramaghattu commented 7 years ago

For example to run crawl job every sunday at 12:00 AM, i used 0 0 sun

Conmariin commented 5 years ago

Is it possible to stop a job with a cronjobformat? Because my Default Crawler job is crawling 24h/7 and never stops.