fixed test for cronjob select old file
fixed scheduled job