+ Start a Discussion
Eric_SalesForceEric_SalesForce 

Creating a traffic counter for VisualForce pages

Hello,

I am trying to create a traffic counter for my VF pages. So right now I have it when the page loads it calls an apex method that increments a field value by 1. I was wondering if there was a way to automate the field to reset when the month ends, is that possible?

thanks,
Sonam_SFDCSonam_SFDC
Hi Eric,

you can schedule an apex class to update the field at the end of every month...check the code in the post below:
https://developer.salesforce.com/forums?id=906F000000092yjIAA
Eric_SalesForceEric_SalesForce
Will it be able to work automatically? By that I mean once the new month starts will it execute the code?