Use UTL_FILE package to write to a file, and use DBMS_JOB package to schedule it.