Agent works for me Doug Finner 22.Feb.13 10:23 AM a Web browser Applications Development All ReleasesAll Platforms
I put your agent into a test db here and it runs fine. If I run it on a doc that hasn't been touched in a while, the 'Yes' path executes. If I then open/edit/save the same doc and repeat the agent, I get the 'No' path.
I'm running a Notes 6.5.4 client. I did not set the agent up to run as scheduled.
Test it in the client with your debugger on to see what happens when you step through the code.
Then add some print statements and run it on schedule and check log.nsf for the output so you can see what's going on and why it might be failing.
Quick thing to check, does the view 'AllDocument' exist on your db and at the client?