Well, yes and no. You can certainly create a cron expression that will mean 12 hours from now and never again, but doing so reliably is not simple and there are a lot of edge cases.
Let's say that it is currently 2:00 P.M. on Wed 15 Jun 2016 in my time zone. This cron expression would do it:
0 0 2 16 6 ? 2016
Because 2 A.M. on the morning of Thu 16 Jun 2016 is the only time that cron expression will ever match. But things aren't as simple as that makes it sound, because:
java.util.Calendar
is one of the worst APIs in existence. The joda-time library or the JDK 8 java.time
package can help you do this correctly.This kind of stuff is possible to do from plugin land. You could create your own JobRunner
that schedules using the proper atlassian-scheduler run-once mode with an interval delay, instead, and react to that by running the appropriate filter subscription directly. The job would clean itself up, so all you would need to do is delete the filter subscription if it is no longer needed.
Take a look at JIRA filter subscriptions (https://confluence.atlassian.com/jiracoreserver071/working-with-search-results-802172637.html)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.