fixed issue 1567 with scheduler and Mysql