• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Corn Job vs MultiThreading

 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a scenario where a scheduler, invoked by a cron job, would pick up list of timings at which a file processor should run.
The scheduler should invoke the file processor at different timings as picked from the database.
The file processor can either be cron jobs or it can be threads.
Each file processor will work on independent files and they would update independently.
The business scenario is such that you will not have any conditions of deadlock on any resource.

What is better to use Corn or Multithreading?
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I see no substantive benefit to using threads in this case.

Nor any advanced Java stuff, either...moving to the Unix forum.
[ July 20, 2005: Message edited by: Michael Ernest ]
 
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How often do the time-definitions in the database change (update, remove, insert)?
Do you like to do this in a 2-step scheduling:

I never created cron-jobs programmatically, but I don't see a problem in creating them from a database.

If jobs get defined typically shortly (few minutes) before the defined time, and have to be executed the same day, I would have a look at the 'at' command.

 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Or, if you're doing one-shot delayed jobs, use the "at" command.
 
Never trust an airline that limits their passengers to one carry on iguana. Put this tiny ad in your shoe:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic