diff --git a/config/example.env b/config/example.env index 9e61f4c03..2f03bd6f9 100644 --- a/config/example.env +++ b/config/example.env @@ -206,5 +206,5 @@ QF_ROUND_ESTIMATED_MATCHING_CACHE_DURATION=60000 # OPTIONAL - default: Every 10 minutes PROJECT_CAMPAIGNS_CACHE_DURATION=600000 -# OPTIONAL - default: */10 * * * * * ( Every 10 minutes) -PROJECT_CAMPAIGNS_CRONJOB_EXPRESSION=*/10 * * * * * +# OPTIONAL - default: *0 */5 * * * ( Every 5 minutes) +PROJECT_CAMPAIGNS_CRONJOB_EXPRESSION=0 */5 * * * diff --git a/config/test.env b/config/test.env index 71fce3f69..5f1398a3b 100644 --- a/config/test.env +++ b/config/test.env @@ -179,5 +179,5 @@ QF_ROUND_ESTIMATED_MATCHING_CACHE_DURATION=1 PROJECT_CAMPAIGNS_CACHE_DURATION=1 -# OPTIONAL - default: */10 * * * * * ( Every 10 minutes) -PROJECT_CAMPAIGNS_CRONJOB_EXPRESSION=*/10 * * * * * +# OPTIONAL - default: *0 */5 * * * ( Every 5 minutes) +PROJECT_CAMPAIGNS_CRONJOB_EXPRESSION=0 */5 * * * diff --git a/src/services/cronJobs/updateProjectCampaignsCacheJob.ts b/src/services/cronJobs/updateProjectCampaignsCacheJob.ts index 3797278ab..b29b11cd6 100644 --- a/src/services/cronJobs/updateProjectCampaignsCacheJob.ts +++ b/src/services/cronJobs/updateProjectCampaignsCacheJob.ts @@ -8,7 +8,7 @@ import { CacheProjectCampaignsWorker } from '../../workers/cacheProjectCampaigns // every 10 minutes const cronJobTime = (config.get('CACHE_PROJECT_CAMPAIGNS_CRONJOB_EXPRESSION') as string) || - '*/10 * * * *'; + '0 */5 * * *'; const projectsFiltersThreadPool: Pool< ModuleThread