Im facing a problem where i want to schedule a certain java application to run every x days, or every x minutes. I really want to have a platform independant solution, but i’ve given up on hope to find a nice solution.
To achieve the scheduling, i’ve been through several solutions, one being services and one being to use the windows api.
I really dont like to use a service, it doesnt deploy well in my project. I would have to use some scripts to install the service, wich just doesnt seems to be the right solution for me.
I’ve also been through windows’s scheduling services. They seem perfect for the job. But i’m having trouble parsing the command line. I want to be able to modify my task after i installed it. but when i query the command line tool, the output language may vary (locale).
Maybe there is a solution that implements different stategies per operating system?
Sure, try Quartz. No scripts, no services, just a JAR in your app. All Java – works on any OS.
I don’t see why platform-independence is required. My experience is that scheduled jobs rarely move off the server where they’re deployed, unless either the need for the job goes away or the server is retired. They just don’t move.
If Quartz isn’t your cup of tea, I’d recommend finding a server admin who knows Windows better than you do to deploy your cron job and be done with it.