Fix crontab error and add restart method