function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
global class dailyCron implements Schedulable { public static String CRON_EXP = '0 0 8 * * ? *'; // 8am Every Day global static String scheduleIt() { dailyCron cron = new dailyCron(); return System.schedule('Daily Cron', CRON_EXP, cron); } global void execute(SchedulableContext sc) { //Send CRB Emails Contact [] cons = [SELECT Id FROM Contact WHERE Last_Email__c <= LAST_N_DAYS:14]; for(Contact con : cons){ con.Send_Email_Reminder__c = true; } update cons; } }
date dt = date.today() + 7;
system.debug(dt);
Hope this helps!
Prady01
Below is sample snippet.
Below are links for your reference.
http://www.infallibletechie.com/2013/02/expiry-notification-through-email-using.html
https://salesforce.stackexchange.com/questions/187932/date-in-batch-apex-query
Hope above information was helpful.
Please mark as Best Answer so that it can help others in the future.
Thanks,
Vinay Kumar