now able to set "mode" variable using environment variable
rewrite crontab whenever frontend defines a new mode