How to run a routine periodically automatically on a java server like wildfly10

Asked

Viewed 575 times

2

In a java web system, I need from time to time that the application server runs a routine automatically (Scheduler). The problem is that I don’t even know where to start, that is how to make the server run this routine without user interaction.

If anyone can give me a direction? What research technology, framework... thanks.

Today I don’t use EJB, I use JSF with 6 primefaces on a wildfly server 10. Spring security only.

Any example is welcome.

  • Is using Spring?

  • You can create a bean using the annotation @Schedule if you are using EJB. If this is the case and you want an example you can update the question.

  • Today I don’t use EJB, I use JSF. Spring only security. Any example is welcome.

1 answer

1


wildfly server 10 is based on Redhat. use crontab to perform periodic tasks inserir a descrição da imagem aqui

  • Actually I am using in windows. But the application will run in the cloud. I will not have access to the Operating System.

  • but if it will run in the cloud you have a control panel do not have ? the crontab is this that I have passed in ss

  • And that I’m not in the cloud phase yet... There is no way to do this directly in Java or by the application server?

  • has both ways but in java you will have to leave a process running eating memory. if your application server is windows use the task scheduler if it is linux worth crontab even but by command line d.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.