an auto script for cron