-1

I am new to creating background tasks in Java. I have a situation in which I need to create a background task that runs every 10 mins to fetch new documents from the Google drive. I have created a Google App Engine project using maven on which I am working. Can anyone please suggest me some tutorials and any guidance how to achieve this task.

Thanks,

Furqan Ahmed
  • 159
  • 1
  • 3
  • 17

1 Answers1

0

For your use case , you should look into the Quartz scheduling library. which does what you want.

http://www.quartz-scheduler.org/

You can add the quartz dependency in your maven pom.xml and write the code in java to schedule a job to do what you want to achieve.

I hope this helps.Please do let me know if you need any further help with this.

Dishant Anand
  • 362
  • 1
  • 14
  • will let you know once I will be finishing my demo – Furqan Ahmed Jul 19 '16 at 10:17
  • actually, quartz scheduler is a really bad choice on app engine unless you have an app that runs in basic scaling mode with a single instance always running. If that is not the case, you should check out [appengine's cron service](https://cloud.google.com/appengine/docs/java/config/cron). – konqi Jul 21 '16 at 13:30