make script runnable from cron