Problem with Scheduled agent

Hi,

We have Scheduled agent in our application that run daily on newly created documents and assigns the values to some fields and sets some flags. Now the problem it is not updating the field but setting the flags for some documents, when I ran the agent manually that time it is updating the field.

What might be the problem, How to resove this issue. Please suggest me.