mirror of
https://github.com/plashchynski/crono.git
synced 2026-02-19 15:17:44 +01:00
Error when no jobs
This commit is contained in:
@@ -29,6 +29,7 @@ module Crono
|
||||
load_rails
|
||||
print_banner
|
||||
|
||||
check_jobs
|
||||
start_working_loop
|
||||
end
|
||||
|
||||
@@ -67,6 +68,12 @@ module Crono
|
||||
require File.expand_path(config.cronotab)
|
||||
end
|
||||
|
||||
def check_jobs
|
||||
if Crono.scheduler.jobs.empty?
|
||||
logger.error "You have no jobs defined in you cronotab file #{config.cronotab}"
|
||||
end
|
||||
end
|
||||
|
||||
def start_working_loop
|
||||
Thread.abort_on_exception = true
|
||||
while job = Crono.scheduler.next do
|
||||
|
||||
Reference in New Issue
Block a user