Scheduled Agent Not Working


I'm trying to understand possible reasons why this scheduled agent is not working.  I have it scheduled to run every hour.   I have visually verified that there are documents in the database that meet the criteria.  This doclink should be sent to the users shown when today is one day past the due date.
The only relevant field is DueDate

SELECT Form = "Issues" & (@Now - DueDate > 84600);

@MailSend("John Smith" : "Anita Jones" ;"";"";"Unresolved Past Due Issue: "; "This issue is now 1 day past due.";"";[IncludeDoclink])

Any help is appreciated.  Thanks!
Who is Participating?
First try setting it up to run from Action menu, and see if it works correctly when run manually.

Another plan of debug attack:
On scheduled agent, instead of @MailSend, have it set a dummy field on the document, so you can see if it ran.  Verify that it works, change the dummy field to another value, Or, do both -- first have it set the dummy field, then have it @MailSend.  MailSend shoudl eb second, in case only the MailSend fails, and the dummy value shoudl be changed form teh first run (where there was no MailSend attempted) so you can distinguish between them.

Note: If you set this to run every hour, it will send duplicate messages every hour, because the same document that macthed an hour ago will also match now.  Did you really want to do this?
From the designer, right-click on the agent name and select "Log...". does it indicate that the agent has run before?  (Note: Each time you re-save the agent, this log is cleared).

If not, make sure your agent is set to run on the proper server, and check that the signer of the agent is permitted to run agents on that server.

You can also run 'tell amgr schedule' at the server console to see what the agent manager is running and has scheduled.

Regarding your code:
Why not use @Adjust?

SELECT Form = "Issues" & (@Now - DueDate > 84600);


SELECT Form = "Issues" & (@Now > @Adjust(DueDate;0;0;1;0;0;0);

> Why not use @Adjust?
Yes, why not? Well, he could also use any of:
SELECT Form = "Issues" & (@Now > @Adjust(DueDate;0;0;0;24;0;0);
SELECT Form = "Issues" & (@Now > @Adjust(DueDate;0;0;0;0;1440;0);
SELECT Form = "Issues" & (@Now > @Adjust(DueDate;0;0;0;0;0;86400);

ALl five are the same, so no need to change! Just a matter of style.

- qwaletee
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.