Java scheduled tasks (in Windows)

I have a problem. I want to schedule a specific Java application to run every x days, or every X minutes I really want a platform independent solution, but I have given up hoping to find a good solution

In order to realize scheduling, I have experienced several solutions, one is service, the other is using Windows API I really don't like using services. It's not well deployed in my project I will have to use some scripts to install the service, which seems to me not the right solution

I have also experienced windows scheduling service They seem to work perfectly But I had trouble parsing the command line I hope to be able to modify my tasks after installation But when I query command - line tools, the output language may be different (locale)

Perhaps there is a solution that each operating system implements a different state?

Solution

Of course, try quartz No scripts, no services, just jars in your application All Java - for any operating system

I don't understand why platform independence is needed My experience is that scheduled jobs are rarely removed from the server on which they are deployed unless the demand for jobs disappears or the server has been retired They just don't move

If quartz is not your cup of tea, I suggest finding a server administrator who knows windows better than you to deploy your cron work and complete it

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>