Changed the logic for scheduled archive