I have a table in database with users and their expenses for traveling. I am using GWT and want to run a code once a month, that would query the database and send bills as PDFs to customers. I know how to create PDFs and send emails from servlet.
How to run a program in java (or some other script if it isn’t possible with java) that would run once a month?
Tnx
Unix and derivatives: use cron -> http://en.wikipedia.org/wiki/Cron
Windows: use task scheduler -> http://support.microsoft.com/kb/308569
If you want to get fancy and do it purely in java: -> http://www.quartz-scheduler.org/, but do consider OS scheduler first.