Works in cron env