As far as i know there is no way to directly do that as cron has a special purpose - running schedules commands at a specific time So the best thing is to either to manually create a crontab entry or write a script which removes and resets the environment