+ Start a Discussion
DileepDileep 

Apex Scheduler

i have a schedule job which will run every day at 11.00 pm, i want to get all all records completed at that day. how can i do this, i dont want to miss any records.

bob_buzzardbob_buzzard

That rather depends on your data model and what completed means.

 

For example, if completed is a date field that is only populated once a record is complete, you could simply query back all records where the complete date = today.

UVUV

I guess, you can process those records in finish method and send an email having details of all those records. For this you need to implement the stateful interface to maintain the state.Also, you can go for the what suggested by Bob.