Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • If you try scheduling the same job from UI, it would throw an error complaining about being duplicate. That is why my whole point started does or should SalesForce has a right mechanism to find duplicates and complain about them. It is a waste of processing time and records will be locked anyways by doing so. Commented Dec 28, 2016 at 16:16
  • In your particular case, it may be a waste of resource, but often it is not. This behavior is WAD. Commented Dec 28, 2016 at 16:19
  • And Adrian, agree on you can schedule as many jobs as we want dah! But my point is should it allow duplicates to run at the same time for example batch1 to run at 6AM for a given apex class and batch2 to run at same 6AM for same given apex class. Then definitely we will end up with row locks and it is a waste of resources. Commented Dec 28, 2016 at 16:19
  • 1
    Only someone with the Author Apex permission can schedule a job, generally. These users should be trusted to do the right thing. If someone is scheduling jobs via the System.schedule method when they should not, you have a people problem, not a platform problem. Commented Dec 28, 2016 at 16:22