有没有比使用字符串连接更好的方法将日历或日期转换为 cron 表达式?喜欢;
Calendar now = Calendar.getInstance();
String cronExpression = now.get(Calendar.SECOND) + " " + now.get(Calendar.MINUTE) + " " + now.get(Calendar.HOUR_OF_DAY) + " " + now.get(Calendar.DAY_OF_MONTH) + " " + now.get(Calendar.MONTH) + " ? " + now.get(Calendar.YEAR);