Reputation: 17898
I want to have spring configured task which will be running with fixed-delay
but only within specific timeframe, lets say 6am - 6pm.
I understand I can have fixed delay like:
<task:scheduled ref="myBean" method="myMethod" fixed-delay="60000" />
or run every lets say hour within a timeframe with:
<task:scheduled ref="myBean" method="myMethod" cron="0 * 6-18 * * MON-FRI" />
How can I combine these? Sure I can do the check for the timeframe from within my bean but I was looking for some pure Spring way of doing it.
Thanks
Upvotes: 1
Views: 562