Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cron scheduler "disable pattern"

Tags:

java

cron

I have application with configured cron tasks. Tasks scheduler config is separated to distinct file.
Could I use same crone scheduler config to enable or disable any task by providing specific pattern?

PS. I got different parse exceptions whet trying to use values like -1, 2000, 2810 for year in the pattern. It works for year 2080, but is there any common approach to be used here?

Thanks.

like image 877
Mike Avatar asked Jun 06 '11 13:06

Mike


1 Answers

Try this cron scheduler expression to effectively disable it: 0 0 0 1 1 ? 2099

like image 124
Yavin5 Avatar answered Sep 20 '22 15:09

Yavin5