Am a new bie to Java, Currently we are running a daily cronjob of executing a class (a struts2 web application project) which sends an email to two different team @ a specific time. The class includes two methods, one for sending email to sales team, and other for sending email to business team of the list of created keywords on the site that day. The requirement is to send an email to sales team @ a different time, and to business team to other team. So, can i write cron jobs by specifying the method name, so that only that specific method will be executed @ that time.
Steve Luke wrote:Not directly, your cron job would have to call your application's entry point. Your solution would be to add a parameter to the application which specifies which group to email. Then your application would have to read that parameter and do the right thing based on its value.