I designed a custom Schedule task last week.
OIM has a process form, resource object, and process Defn.
Case : All the users from reconciliation come into OIM and through automated policy get provisioned to the process Form.Custom Scheduled Task picks up all the users from the process form, which is present for any application (Table)(Dynamic Code) and places it in the text File. I have created a dynamic look-up in which you can enter all the fields in the code key which you need in the text file and decode key any label name appended with 00,01,02, etc. This numbering will put it in a sequence you want in a text File.
One more Thing I took care of is, suppose you are writing to text file, and other application comes to pick up the file. So, I have moved the file to temp location and once Schedule task is complete, then move to final location.
In Schedule task I have created five attributes.
FilePath (Temporary Location)
File Location(Final Location)
Process Form name (Table Name)
This is the dynamic one, which can be used for any process form in OIM and then push it in a text File or From any table and push it in a text File.