Java Spring do scheduled task at a specific time of specific timezone
Use a CRON specification:
<task:scheduled ref="beanC" method="methodC" cron="0 0 0 * * ?"/>
Run at midnight every day.
If you instead annotate your method, you can specify the time zone:
@Scheduled(cron="0 0 0 * * ?", zone="Asia/Ho_Chi_Minh")public void methodC() { // code}