Trigger in java?

0

I have a curiosity, could I do some kind of trigger in java? For example, I would like my application to send me an email every week, to say something with all the sales made the previous week, because I could be reviewing the date with a while but I do not think it is the most optimal.

    
asked by 09.10.2017 в 16:34
source

2 answers

0

look for the documentation of quartz, this works under threads and at a certain moment, depending on the configuration it gives you a report, a message, etc., if you want to see how it works check a simple example of quartz,

in this URL, you find an example where you greet every 5 seconds, clearly you can set the time you want

link

I hope you serve and I remain pending.

    
answered by 09.10.2017 / 23:43
source
1

What you want to do is called a demon, not a trigger. In a daemon programs what you want to do (in this case send an email with a report) and to make it run periodically you register as a task scheduled in windows or you add it to crontab in any unix like linux or solaris.

    
answered by 09.10.2017 в 16:45