Scheduling tasks to run at regular intervals in DAYS

Answered

Hello,

 

As I understand I can use AppExecutorUtil.getAppScheduledExecutorService for scheduling tasks at regular intervals. But Can I use it if intervals must be in DAYS? Or for this case, I need to implement custom logic?

 

Thank you!


Best regards,

Alex.

0
2 comments

You'll most likely have to persist last run timestamp as application settings, as the IDE is not guaranteed to be running for days. See com.intellij.openapi.updateSettings.impl.UpdateSettings for sample. Then you can schedule a checker that runs "often enough" to check against last run timestamp and trigger action/update last run timestamp.

0

Thank you, Yann! 👍

0

Please sign in to leave a comment.