UrbanPro
true

Learn Salesforce Developer from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

How To Schedule Batch Apex In Minutes/Hours?

Kumar
05/08/2017 0 0

To schedule the batch class in minutes/hours, in the finish method we should use System.schedule method which will take 3 parameters Job Name, Chrone Expression and schedulable class instance name respectively.

   /*** Scheduling in minutes or hours ***/

 //Create object for schedulable class

 SchedulableUsage su = new SchedulableUsage();

 //Preparing chron_exp

 Datetime sysTime = System.now();

 sysTime = sysTime.addminutes(6);

 String chron_exp = '' + sysTime.second() + ' ' + sysTime.minute() + ' ' +

 sysTime.hour() + ' ' + sysTime.day() + ' ' + sysTime.month() + ' ? ' + sysTime.year();           

 System.schedule('Dep Update'+sysTime.getTime(),chron_exp, su);

0 Dislike
Follow 0

Please Enter a comment

Submit

Other Lessons for You

What is a standard direct mail workflow?
Many nonprofits have been doing direct mail for years or even decades, so we’ve all developed our own particular processes. Every organization is unique and has different direct mail needs and goals....
T

Thinksoft Infotech

0 0
0

Before Take Salesforce Training Need To Ask Below Things
In every platform technology will be follow below things: i. Software Development Life Cycle--------SDLC having diffrent METHADOLOGIES (Salesforce SDLC -- Agile and Agile with SCRUM) What is the difference...

Assigning One permission to multiple users automatically without any manual work.
Hi Friends,I recently came across below new things I did in my project. Hope it helps you too.Description :How to Assign one permission set to multiple Users ? For example: If I want to assign ONE permission...

Trigger Best Practices
Triggers - Best Practices in Salesforce 1. Future methods, SOQL and DML: Avoid writing Future methods, SOQL and DML inside the "For" loop.2. Bulkify the trigger: Start developing the logic...
R

Rajiv Kumar Singh

0 1
0

How to Learn salesforce easily?
Steps: 1.Know the course content. 2. Collect all materials. 3. Separate all materials into A.Admin B.Development C.Project. 4. Get the best trainer and follow him/her. 5. Update your skills with the help of all available resources.
X

Looking for Salesforce Developer Classes?

The best tutors for Salesforce Developer Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Salesforce Developer with the Best Tutors

The best Tutors for Salesforce Developer Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more