File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to devide a task into several parts

 
shyam sunder prasad
Ranch Hand
Posts: 62
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have an application, that application is used to send sms.
so, i am having 500 phone numbers. but i cant send all phone numbers at once to sms class.



so..i want to send the phone numbers only 20 at once to reduce the load and increase the performance.

please help me out how send 20 number periodically ,any job scheduler is there to organize it .

thanks in advance.
 
Ramon Anger
Ranch Hand
Posts: 56
Chrome Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shyam,

is there a way to check the state of your sms server? READY or BUSY or something that kind?

If so, you could do the following:

1. Write a method. That returns the current state of the sms server.
2. Write a method that returns you the next n sms from your queue.
3. Write a handler that checks periodically the state of the sms server.
If the server is in state READY, get the next n sms and send them to the sms server.
After that, check the state of the sms server again

Best,
Ramon
 
shyam sunder prasad
Ranch Hand
Posts: 62
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
some one told me that there is spring job scheduler to schedule a task periodically one after one another.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic