Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×I would like to call the admReindex() function to reindex JIRA once per week on Sunday morning at 1 AM which during our maintenance window. I have looked for a way to automate calling this SIL function and cannot locate a time based function in which to call admReindex(). Is there an approach someone from Kepler-rominfo can recommend.
Hi Craig,
In case you still need it, since JJUPIN 3.0.8 scheduler services have been implemented.
They are available only for JIRA versions greater that or equal to 6.2.
Hope this helps,
Alexandra
I will have to upgrade our JJupin to try this approach. We are on Jira 6.3.9. So no problem. In practice the approach I mentioned above worked in test but DID NOT work in Prod. In fact, it corrupted my index. Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You should ask for support when running into problems, It's a joy to work with Kepler team.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi there,
I don't know if that is the "proper" way to do it, but for sure one of the easiest way to do this is something like this:
Set up a SIL service with 1h interval and with following SIL sript:
string CurrentDayOfWeek = dayOfWeek(currentDate()); number CurrentHour = hour(currentDate()); logPrint("INFO", "Weekly reindex service initiated. Checking timestamp..."); if (CurrentHour == 1 && CurrentDayOfWeek == "Sun") { logPrint("INFO", "Timestamp correct. Beginning reindex."); admReindex(); } else { logPrint("INFO", "Timestamp incorrect. Service aborted."); }
I think the more bulletproof way would be to call one global service with a short timer like 5 minutes. This service could look into the database, check last and next execution times of the dependant services and execute the ones that meet the conditions. Never done it this way but this approach could get rid of few drawbacks of JIRA interval-timed services.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Błażej Olszyca This seems a most reasonable approach. I will try it on our test instance and see how it goes. Thank you --Craig
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Craig,
JJupin doesn't have a cron-like service yet, if your instance won't be restarted you can use a SIL Service with a high enough delay. You can also create a cron job yourself and, using curl, you can call the runScript REST method ( https://confluence.kepler-rominfo.com/display/SIL30/Common+REST+Service#CommonRESTService-runScript ). The script can be anything you like, including admReindex.
HTH,
Silviu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Silviu Burcea Hi, I will investigate this approach as well. Thanks --Craig
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Craig Leigh Alexandra's answer outperforms mine, it's the right way and her answer should be accepted too.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.