function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Amy ThroppAmy Thropp 

I have a button on my campaigns page that will send a campaign list to Pardot. Can anyone think of a way that I can automate the "button push" on a timer so that data gets sent to Pardot on a schedule?

I have the following URL behind the button:

https://pi.pardot.com/list/pullCrmCampaign/fid/{!Campaign.Id}/campaignName/{!URLENCODE(Campaign.Name)}/leadCount/{!Campaign.NumberOfLeads}/contactCount/{!Campaign.NumberOfContacts}?sessionid={!$Api.Session_ID}&serverurl={!$Api.Partner_Server_URL_90}

Can I create some apex code to do this and put it on the scheduler?

Amy
SonamSonam (Salesforce Developers) 
Hey Amy,

Don't think we can schedule a button push but you can write the code in an apex class and schedule it for every day run:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_scheduler.htm
https://help.salesforce.com/HTViewHelpDoc?id=code_schedule_batch_apex.htm&language=en_US