Apex that runs at a specified interval (similar to a cron job).

learn more… | top users | synonyms (1)

1
vote
0answers
11 views

Apex Scheduled jobs stopped executing unexpectedly

We have 2 scheduled jobs which are executing hourly basis in our app. In few of our client's org, they stopped executing unexpectedly. They are shown in Setup->Monitoring->Scheduled Jobs But, the ...
0
votes
1answer
39 views

not getting output for schedulable batch class

global class BatchClassExample implements Database.Batchable<sObject> { global integer i; global list<sObject> start(Database.BatchableContext BC) { ...
1
vote
2answers
38 views

Getting Scheduled Apex Job name in the apex class

I have two scheduled apex jobs ScheduleJob1 and ScheduleJob2. Both these jobs call an apex class implementing the Schedulable interface global class TaskController implements Schedulable { ...
1
vote
1answer
24 views

How can I query the class which the schedule job will call

I am trying to get the name of the schedule / batch classes called by the schedule job Trying this select Id,CronJobDetailId,CronJobDetail.Name, ...
1
vote
0answers
13 views

Change Email Language, Not Based On Running User's Language

I created a scheduled job which sends an email to System Administrator everyday. The scheduled job works in English and Japanese. I created a custom label and used translation workbench to translate ...
3
votes
1answer
45 views

Invocation of scheduled class : starts - schedules - completes without a trace. No debug log

I've got an Apex Class that implements System.Schedulable which I'm trying to run: public class Broker { //... public class Worker implements System.Schedulable { public void ...
1
vote
1answer
48 views

Unable to query CronJobDetail.Name from CronTrigger in Apex

I have been implementing Dan Appleman's solutions since his appearances at Dreamforce, and am currently working with his Going Asynchronous solution and running into a snag. I put a partial solution ...
1
vote
1answer
22 views

Related to scheduling :How insert a list in spite of one of its element is having exception

I have set scheduling on Lead in which on daily basis a SMS and a mail gets deliver as a reminder to client. But when there is an error in email id and salesforce display an error that mail id is not ...
2
votes
1answer
69 views

How to re schedule a batch if already 5 apex batch jobs are running

I am trying to schedule a batch after 15 mins from my post installation script which take 100 records and process it. But it might be possible that when my scheduled job will start already another 5 ...
0
votes
1answer
41 views

Getting null pointer exception running a batch apex

I am getting an error like "Argument 1 cannot be null" while running this batch apex Batchupdate_Montly_DepthTracker. Please note this batch runs on result sets returned from a scheduled apex. ...
0
votes
2answers
46 views

Apex batch getting an error out

I have this Apex batch having issues with call. I am new in this apex-world. Can someone help me out. My code is here. global class Samplelotinactive implements ...
1
vote
1answer
64 views

Tooling API and Scheduled Batch Apex - How to access

Without storing a users credentials to salesforce how can one access the tooling API during a daily scheduled batch? Currently we are storing the users username and password in encrypted fields but ...
3
votes
1answer
91 views

Export data to a file using apex

I have a requirement to Run SELECT query on custom object export the data to csv file Automate / schedule step-1 and step-2 . I know how to achieve step-3, by using apex scheduler class. But I ...
0
votes
0answers
17 views

How to provide Scheduled Apex in Managed Pck with the risk of failing ugrades [duplicate]

You read it everywhere. Adding scheduled classes to a managed package is the safest way to big pain. Scheduled classes prevent later upgrades and the like... So what's a better way to add a cleaning ...
1
vote
2answers
86 views

Scheduling Job is not executing on daily basis

I have the same problem which this guy faced and came with a solution. I am not fully satisfied with the solution . The same happen to me that my Apex job does remain as 'Queued' and many times never ...
1
vote
1answer
28 views

Map Value gets overwritten

I have a scheduled Apex job that queries a child object and ordered by the parent Id. Then I have a for loop that groups all the child objects w/ the same parent Id into a list and then cache them in ...
1
vote
0answers
48 views

0% code coverage on apex class [closed]

Hope all is well I have the following class (see below), however i am unable to test my logic, as i am getting 0% code coverage.Can any one help me write a test class for the following class below. ...
0
votes
1answer
33 views

How can I create a campaign map that returns a list of all the campaign members associated with it?

In the Force.com Explorer I can perform the following query: SELECT Id, (SELECT Id,LeadId,ContactId FROM CampaignMembers) FROM Campaign It displays every campaign.Id in one column and the next ...
0
votes
1answer
33 views

Batch scheduler time , status and account

I'm stuck for one of the requirements . Have to check the Status , Time and Name/created by of the Batch Schedular .Have a query working for CronTrigger for this but how do i implement it through ...
0
votes
0answers
91 views

I am executing a Batch Apex class to delete the records from Recycle Bin but the records are not getting delete?

This is my code: global class EmptyRecycleBin implements Database.Batchable<sObject>{ global Database.querylocator start(Database.BatchableContext BC){ string query ; return ...
1
vote
3answers
99 views

Deploy APEX without running all tests

I have 20 scheduled APEX classes, and every time I want to change one or deploy new APEX I get an error for every Scheduled APEX test class like this: Failure Message: "System.AsyncException: The ...
0
votes
1answer
548 views

How to Close Popup and refresh parent window in salesforce?

My requirement is whenever user clicks on some custom button on child window, that window gets closed plus the parent page should be refreshed. But only child window is getting closed and parent ...
1
vote
1answer
91 views

Schedule Meeting for a Contact from Custom VF Page? Similar to Cloud Scheduler Functionality in Salesforce

Cloud scheduler in salesforce is used to schedule meetings for Contact, Leads or Account. Can the same functionality be achieved from Custom Visual force page. Either by invoking the same pop up ...
3
votes
2answers
843 views

how to pass value from visual force page (InputField) to controller?

I have created a Vf page from which i need to fetch the value of new owner and need to save the value in property defined in controller: Following is my vf page code: <apex:pageBlockSection> ...
2
votes
1answer
351 views

Class Error Unexpected token Global

I need some help, I have created the following (see below) However I am getting the following error : Error: Compile Error: unexpected token: global at line 28 column 0 I do not understand why ...
8
votes
1answer
108 views

Transferring ownership of triggers, workflows, etc

My org has an account that was used by a consultant to create various apex triggers and classes, workflows, visual force and other custom development. The higher ups want to disable this now unused ...
5
votes
2answers
1k views

How to run a scheduled job every 15 minutes?

Using the salesforce GUI it seams impossible to schedule a job every 15 minutes. Or more than once a day.
3
votes
1answer
73 views

Need System.schedule cron string for run once

Is there a way to use System.schedule to schedule a job that runs only once? I've been looking at the special characters allowed there, and I'm not seeing a way to do it. What I want to do is use ...
2
votes
1answer
56 views

Mass deletion of records through apex

Aim- I want to delete any record within custom object training__c where the created date is greater than 6 months from today's date. I would like to run this job daily. I apologise if the following ...
5
votes
1answer
130 views

Does Test.stopTest() ensure a System.Schedule/Database.Batchable completes in a test?

I am struggling to successfully test some code that is essentially the same as the code here Apex test class for schedulable class that checks for 5 batches running already. I can get the ...
4
votes
3answers
140 views

How to find/stop/disable Apex Jobs that a read-only user has activated

As a followup to this question, Contact last-modified date changed by read-only user - it appears that the source of the issue might be that a read-only user some how activated APEX batch jobs that ...
1
vote
1answer
75 views

Batch Apex to update Opportunities if the stage is closed Won

I'm want to update all Closed Won Opportunities Every Month and this is my batch apex class the problem here is it's not entering if loop but I guess if loop is proper. I'm unable to rectify where the ...
7
votes
2answers
79 views

What does the Batch Apex “Holding” status mean and where is it documented?

I've seen the following values in the AsyncApexJob table during the 'cradle to grave' life cycle of a Batch Apex job: BEFORE running: Queued Preparing WHILE running: Processing AFTER running: ...
0
votes
1answer
44 views

I am not the getting the code coverage for the following lines shown in image

Here is my schedule class : global class Scheduler_class implements Schedulable{ public static String CRON_EXP = '0 00 00 * * ?'; //Every Day at Midnight global static String scheduleMe() { ...
4
votes
1answer
244 views

Scheduling Batch class

How to schedule the batch for every two hours per day? I try like this String schedule = '0 0 1/2 * * ?'; System.schedule('Jobname',schedule,new SampleTracking()); but i don't know it ...
2
votes
1answer
48 views

How can I get the details of last schedulable job and of which class? Is there any way?

I have a requiurement where I have to get the details of last job details and the Of which clas s. How can I get the details ? i have tried using CronJob details and CronTrigger?
1
vote
2answers
58 views

Batch to batch call for inserting large data

public someClass{ public static someMethod(){ //this method is called in some batch list<sObject> slist= new list<sObject>(); //some operation //slist size ...
1
vote
1answer
265 views

Error Error: Compile Error: Loop must iterate over a collection type: SOBJECT:Order_vod__c at line 35 column 37

I wrote the below batch job. It should update the order_vod__c objects comments field with related approval comment from ProcessInstance or ProcessInstanceSteps tables. However, when saving this code ...
0
votes
1answer
36 views

Scheduled batch job from InstallHandler and further upgrades of managed package

As I understand the further upgrade can fail if we try to update the class which already has scheduled job in the managed package, right?
0
votes
1answer
37 views

Scheduled Job Does Not Seem To Be Running

I have a Scheduled Job that doesn't seem to be running, and can't figure out why. When I go to Monitor > Jobs > Scheduled Jobs, two of my scheduled jobs are the following: "Queued SMS Engine" is ...
6
votes
1answer
255 views

Future vs batch

I need to make asynch call from trigger. Records are comming (1 or 1000 at once) each minute and I need to process them from trigger asynchronously. As I see limits for future and batch jobs are the ...
1
vote
1answer
28 views

Scheduling expression

Scheduling expression is 0 0 7 * * ? which means: run every day (weekdays +weekends) each month each year at 7AM but when scheduled job is created the settings are the following:
1
vote
1answer
54 views

.Net to Salesforce Integration

I used EnterPrise WSDL for Salesforce integration. I was able to access the Account,Lead,Contacts, etc. objects. I need one help. Is it possible to get Apex Job Schedule from .Net?
21
votes
1answer
234 views

InstallHandler runs under a special ghost user. What rights does it have?

When you install a managed package with a post-install script, Salesforce creates a special ghost user under which all of the post install activities occur. I think this is undocumented. Here are some ...
4
votes
2answers
238 views

Scheduled batch “already scheduled”

I had a batch job that I tried to start. Its "startup" method that launches it checks to see if it's already running by querying the asyncjob object, then starts it only if it's not running already ...
1
vote
1answer
173 views

Make Test Class Specific to Scheduled Apex

I was wondering if there is a way to make a Test class only run for the Apex Class it's made for. Every time I want to import new classes or triggers, I have to turn off all of my scheduled Apex, then ...
4
votes
1answer
178 views

Apex scheduled job to call .net web services hosted in IIS periodically

I just wondering if someone could guide me to a document of how to perform Apex scheduled job – To call .net web service hosted in IIS of external server on a periodic basis. My requirement is every ...
1
vote
3answers
64 views

Why is this test not getting 100% coverage?

here I created scheduler class that will schedule at every 5 mins. and G1_count field will update in every 5 min. i have covered 77% of code but I want it up to 100%... I don't know what I am missing ...
-1
votes
1answer
80 views

how to test the batch code?

How to write test class for this code 75% coverage or not? global class SearchAndUpdate implements Database.Batchable<sObject>,Schedulable { global final String Query; public ...
1
vote
1answer
137 views

Re-ownership of scheduled job from managed packages

One of my orgs has a managed package in it, and was installed by a previous user, who has now been deactivated. Firstly therefore, this means I notice that on the package detail page, it is "Installed ...