summaryrefslogtreecommitdiffstats
path: root/archiva-scheduled/src
diff options
context:
space:
mode:
authorJoakim Erdfelt <joakime@apache.org>2007-05-25 18:33:59 +0000
committerJoakim Erdfelt <joakime@apache.org>2007-05-25 18:33:59 +0000
commitbf565c3f3a5d59112794a9db994d00c9dc800f49 (patch)
tree09a208237243dc0c98cf0502528aca2bd3651336 /archiva-scheduled/src
parent5a681a15c90ba8948f5f60fe994e0d6b22077c91 (diff)
downloadarchiva-bf565c3f3a5d59112794a9db994d00c9dc800f49.tar.gz
archiva-bf565c3f3a5d59112794a9db994d00c9dc800f49.zip
[MRM-331]: Finding an Artifact gives an HTTP 500
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@541744 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-scheduled/src')
-rw-r--r--archiva-scheduled/src/main/java/org/apache/maven/archiva/scheduled/DefaultArchivaTaskScheduler.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/archiva-scheduled/src/main/java/org/apache/maven/archiva/scheduled/DefaultArchivaTaskScheduler.java b/archiva-scheduled/src/main/java/org/apache/maven/archiva/scheduled/DefaultArchivaTaskScheduler.java
index 083e9b07d..8d0e5690d 100644
--- a/archiva-scheduled/src/main/java/org/apache/maven/archiva/scheduled/DefaultArchivaTaskScheduler.java
+++ b/archiva-scheduled/src/main/java/org/apache/maven/archiva/scheduled/DefaultArchivaTaskScheduler.java
@@ -176,6 +176,15 @@ public class DefaultArchivaTaskScheduler
dataMap.put( DatabaseTaskJob.TASK_QUEUE, databaseUpdateQueue );
databaseJob.setJobDataMap( dataMap );
+ CronExpressionValidator cronValidator = new CronExpressionValidator();
+ if ( !cronValidator.validate( cronString ) )
+ {
+ getLogger().warn(
+ "Cron expression [" + cronString
+ + "] for database update is invalid. Defaulting to hourly." );
+ cronString = CRON_HOURLY;
+ }
+
try
{
CronTrigger trigger = new CronTrigger( DATABASE_JOB_TRIGGER, DATABASE_SCAN_GROUP, cronString );