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
Alan MonkAlan Monk 

Home custom links running a scheduled job in visual force page

I want to create a custom link on the home using a visual force page to execute a scheduled job immeduiately. the details are below

<apex:page controller="TelesalesDataProcessor runJob = new TelesalesDataProcessor";>
</apex:page>

Can someone suggest a better solution please.
Om PrakashOm Prakash
public class TelesalesDataUtility{

   public void scheduleJob(){
     TelesalesDataProcessor runJob = new TelesalesDataProcessor();
     runJob.execute(null);
   }
}
 
<apex:page controller="TelesalesDataUtility">
  <apex:form>
      <apex:commandButton value ="Execute Job" action="{!scheduleJob}"/>
  </apex:form>
</apex:page>
Try this and let me know if any query.
 
Alan MonkAlan Monk
Thank you for your response, I will get back to you later on if that ok. Thanks Alan