The tasks are not run if year ( say 2003 )is specified as in the following example:
insert into events(minute, hour, dayofmonth, month, dayofweek, year, task, extrainfo) values('*', '*', '*',
'*', '*', '2003', 'com.test.console.schedule.Task', 'hello');
JCrontab gives the following error in such a case:
17:22:57,716 ERROR [jcrontab] org.jcrontab.data.CrontabEntryException: Smth was wrong with 2003
org.jcrontab.data.CrontabEntryException: Smth was wrong with 2003
at org.jcrontab.data.CrontabParser.parseToken(CrontabParser.java:221)
at org.jcrontab.data.GenericSQLSource.findAll(GenericSQLSource.java:176)
at org.jcrontab.data.CrontabEntryDAO.findAll(CrontabEntryDAO.java:77)
at org.jcrontab.Cron.readCrontab(Cron.java:241)
at org.jcrontab.Cron.generateEvents(Cron.java:256)
at org.jcrontab.Cron.run(Cron.java:151)
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Pls help w/ the following issue:
The tasks are not run if year ( say 2003 )is specified as in the following example:
insert into events(minute, hour, dayofmonth, month, dayofweek, year, task, extrainfo) values('*', '*', '*',
'*', '*', '2003', 'com.test.console.schedule.Task', 'hello');
JCrontab gives the following error in such a case:
17:22:57,716 ERROR [jcrontab] org.jcrontab.data.CrontabEntryException: Smth was wrong with 2003
org.jcrontab.data.CrontabEntryException: Smth was wrong with 2003
at org.jcrontab.data.CrontabParser.parseToken(CrontabParser.java:221)
at org.jcrontab.data.GenericSQLSource.findAll(GenericSQLSource.java:176)
at org.jcrontab.data.CrontabEntryDAO.findAll(CrontabEntryDAO.java:77)
at org.jcrontab.Cron.readCrontab(Cron.java:241)
at org.jcrontab.Cron.generateEvents(Cron.java:256)
at org.jcrontab.Cron.run(Cron.java:151)
Thanks
Hi Krishna,
It's solved in version Jcrontab 1.4.
Hope it helps.