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

learn more… | top users | synonyms (1)

1
vote
1answer
12 views

testing future with callout from schedulable class

I'm definitely missing something. How do I test Schedulable class with a future method that does a callout?I have 100% code coverage of the Schedulable class but 0% of my service.The test fails as no ...
1
vote
1answer
17 views

Sending an VF Template Using Apex

I am trying to send an VF Template using the Schedular Apex. when i run the code below is the error message received: FATAL_ERROR System.EmailException: SendEmail failed. First exception on row ...
0
votes
0answers
32 views

INSUFFICIENT_ACCESS_OR_READONLY error when sending email from scheduled class

I have a batch job that send emails on user anniversaries. It works when I run it in the execute anonymous window from SF's developer window. I'm sending it through the org-wide email address and I've ...
1
vote
1answer
15 views

Issue with Schedulable implementation and Callout

I am receiving an error message when trying to test a class that implements Schedulable. System.CalloutException: Callout from scheduled Apex not supported. People have suggested using the @future ...
1
vote
2answers
36 views

Process Builder vs Scheduled Apex

I have the following requirement. Update the date field for a specific set of opportunities every day. My first thought process is to build a batch/scheduled apex solution and schedule it to run ...
0
votes
1answer
34 views

Too many DML rows: 10001(bulk update)

I am getting an error of Too many DML rows: 10001 on my batch class.I am putting up the code here consisting of both my scheduler class and batch class which is called through it. Scheduler Class :- ...
0
votes
0answers
8 views

Partial updation/creation/deletion of records in Visual Flows are possible?

I am wondering and did not found any article on this as we all know, DML database methods allows partial success of a bulk DML operation if a record fails, the remaining of the DML operation on ...
0
votes
1answer
34 views

Update latitude and longitude through batch apex

When i run my batch apex latitude and longitude are not getting updated in customer object. i need to update 50000 record.. getting lat and long using google API i able to request 2500 record per IP. ...
0
votes
0answers
19 views

what does mean each digit in system.schedule

I just want to know what each digit means in (String CRON_EXP = '0 0 * * * ?'; ) AND Can you explain what does meaning for below lines. System.schedule('Hourly', '0 0 * * * ?', new MyHourlySchedule() ...
-1
votes
1answer
32 views

2 Separate batchable jobs or 1 combined one? [closed]

I have a batch job which runs overnight, which currently only uses the Opportunity object. I now have a need to run the same process for the Order object. How would I do that - do I need to create 2 ...
0
votes
1answer
20 views

Need to cover Else if part in test class

I covered 1st six condition but after that i am not able to increase my code coverage.Plz help. Apex class: if(acc1.Domain_Name_Number__c == 0 && acc1.Subscription_Age__c == 7 && ...
1
vote
0answers
34 views

Using Named Credentials to get Salesforce sessionId

I have a system that is posting data to a streaming channel which works upon data changing and a trigger firing. The a code snippet is shown below. string sessionId = ...
6
votes
2answers
55 views

Is it possible to queue a queueable apex job from a scheduled apex job?

I am attempting to implement a piece of scheduled apex which can work in an org with remarkably long computation time, meaning only a few hundred records can be operated on in a single context before ...
0
votes
0answers
30 views

How to schedule a class to send emails with user's email as sender?

Right now every email my scheduled class sends has my email in the replyTo address field, even though in the template I set up so it would get the record's user email, like in: ...
0
votes
0answers
18 views

Is it possible to clear the Scheduled Jobs page?

Having a demand that involves scheduling of several different classes at different times, the Scheduled Jobs page can get really polluted. This happens mainly because jobs that were executed are still ...
1
vote
0answers
31 views

Apex Batch job is failing with Internal Salesforce Error

I have a batch job that i'm executing from developer console Id batchJobId = Database.executeBatch(new TPI_BATCH_CHILD_ACCOUNT_PUSH(), 200); But i've checked from workbench with the batchjob id its ...
2
votes
1answer
45 views

The future of Async Apex - everything Queueable?

I know that this is a somewhat opinion based question but there is definitely interest in the community in where the Roadmap goes. Do I get the blogs and communities and blogs right that we are ...
6
votes
2answers
131 views

what happens with Schedule job and other processes during salesforce maintenance

Many times maintenance window is shown when we login in salesforce. My question is when this maintenance is going on at that particular time what happens with the schedule jobs, apex jobs and other ...
0
votes
0answers
10 views

purgeOldAsyncJobs(dt) does not delete old aborted ScheduledJobs

I have a process that create scheduledjobs every minute (someone else wrote it). It is scheduled every day at 8 then schedule itself until 20. I know Salesforce should delete jobs older than 7 days ...
1
vote
2answers
14 views

Schedule Trigger by Updating?

If I have a trigger that runs on Campaign update. Can I schedule it by writing a batch that just updates all Campaigns? Or do I need to reproduce the logic of the trigger in the batch itself. IE can ...
1
vote
1answer
48 views

What happens to a Scheduled Job if the Apex Flex Queue is full?

Given that the limit on the Apex Flex Queue is 100, what happens when it is time for the system to execute a Scheduled Job (of a Database.Batchable), but the Apex Flex Queue is maxed out at 100? Is ...
2
votes
1answer
50 views

How to update the scheduled jobs in apex

I have scheduled batch class through salesforce UI. This will run every day @1:00 AM from 1/1/2016 to 1/31/2016. Now i need to change schedule job time and extend the end date of the job. Is there ...
0
votes
0answers
10 views

Outgoing calls in schedueled apex [duplicate]

I am trying to set a batch scheduled apex job with some outbound calls and its giving me errors, more specifically this one: Callout from scheduled Apex not supported. Is there a way to circumvent ...
0
votes
0answers
19 views

Schedueled Data Sync between salesforce and external server

I am trying to do a data sync between my salesforce instance and an external server every 6 hours, I tried with a batch class that runs at that interval but it is complaining that you can't do future ...
2
votes
1answer
46 views

Need to change a schedule for apex class

Need to know , How to find a class is scheduled. Assuming since I do not see the system.schedulebatch in either of the classes that it is scheduled. I was looking for the following changes: How do ...
1
vote
2answers
67 views

Cannot delete AsyncApexJob using System.abortJob

I'm facing the "ghost" job issue in an organization (thankfully is a sandbox). I had a class scheduled to run in a daily basis, and it was working fine, until I accidentally scheduled it again (2 jobs ...
1
vote
2answers
37 views

Apex Job - Writing to a log

I have been working with a few classes in the Developer Console and Execute Anonymous Window. All of these classes have various system.debug() calls through the code - the log entries are used for ...
1
vote
1answer
39 views

Schedulable Class with Messaging.SingleEmailMessage Utility Code Coverage

Here is my dilemma, I have a Schedulable Class that is set up to send an email reminder on a Task. I have two solutions; (1) The Schedulable Class that includes the Messaging.SingleEmailMessage ...
1
vote
2answers
33 views

Can we attach salesforce file attachment to records by scheduler or anyway?

I am trying to find workaround for mass uploading files and attach it to records based on some unique number. Example:Account with pan number-12345 ..when I upload files to salesforce file it should ...
0
votes
2answers
40 views

Test class for Schedulable class

I have the following class which implements the 'schedulable' interface and need help to write a test class to complete the code coverage please: the class checks if the campaign start date is ...
0
votes
1answer
56 views

Apex CPU time limit exceeded error in scheduler class

I have a Scheduler apex class that is facing CPU time limit exceeded error. Can someone please help me to by pass this error here? Please find my Scheduler apex here. global class ...
-1
votes
1answer
24 views

Simple testing question related to inserting and updating of custom object data and persistence of the data post-test run

I am new to SF coding and I have a fairly complex Apex class that takes a bunch of data and uses it to generate data into a new custom object. This is not a trigger but meant to be a scheduled batch ...
0
votes
1answer
33 views

Test class not covered need to increase coverage

I wrote scheduler class and test class which is covered 70%. but some part not covered Scheduler class: global class PartnerLeadtoAccountScheduler implements Schedulable { global void ...
1
vote
1answer
119 views

error: REQUIRED_FIELD_MISSING, Required fields are missing: [LastName]: [LastName]

I wrote a scheduler class. It is working fine and test coverage also covered, but When I am deploying from sandbox to production then Got an error. Scheduler Class: global class ...
0
votes
1answer
32 views

shall i write apexPages.messages in the dependent classes of controller?

shall i write apexPages.messages in the dependent classes of controller? is it displayed on the page if we it meets the criteria. Lets take i have vf page A, Which has B has controller and c is the ...
0
votes
0answers
13 views

Update Check-box on different condition

I have 2 Check-box in Partner Object Updated Checkbox Duplicate Checkbox When I create Partner record then After Scheduler class Account Should be created and In Partner Object Updated Checkbox ...
0
votes
1answer
29 views

On insertion record Scheduler class not working

I have Partner_Lead__c object. I have a scheduled Apex class that creates Accounts from the Partner_Lead__c object The Partner_Lead__c.email_address__c field should be copied into ...
3
votes
2answers
87 views

How many batches can I run in 1 schedulable class

I have 5 batch classes (implements Database.Batchable). I was able to add all of them in a single schedulable class (implement Schedulable) and schedule it successfully (code below). It worked. ...
0
votes
1answer
19 views

Unable to fine schedule job for apex class

I have one apex shedulable class. I am trying trying to search class in All Scheduled Jobs,but i dont know the name of job for that perticular apex class. How should i find the job name for that ...
2
votes
2answers
47 views

QueryLocator generates scope of the Object

I am recently working with building apex batch job and I came across Database.QueryLocator which I believe can create scope of the object which is passed to the execute() method. I do not understand ...
0
votes
1answer
54 views

Apex Batch jobs logs?

I am running a batch job in my Sandbox from execute anonymous. When I create an object of the apex batch class and use database.executebatch(obj,50); I can run the apex class which does the batch ...
0
votes
0answers
29 views

close case object

how we can implement auto closing in case object ? The scenario is to get the cases closed automatically if the status remains the same for certain hours. What option we can use to implement this ...
0
votes
1answer
48 views

Execute method in Apex batch never called

I have an apex class though which I do batch processing of some xml files. Below is a part of the code from my apex class: global class DoHMHParsing implements Database.Batchable<sObject>, ...
0
votes
1answer
33 views

Schedule Class Error - DML statement found null SObject at position 0

I am getting an error DML statement found null SObject at position 0 in my scheduler class. I have pasted the code below.I am trying to insert Partner Lead object data in Accounts by a scheduler ...
0
votes
0answers
16 views

Can I execute a schedulable class that is an inner class? [duplicate]

I'm wondering if I can put multiple schedulable classes inside one class. global class Scheduler { global class Foo implements Schedulable { public Foo() {} global static void ...
0
votes
1answer
81 views

DML statement found null SObject at position 0

Got an error: DML statement found null SObject at position 0 I wrote scheduler class where i find error. global class update_Account implements Schedulable { global void ...
3
votes
1answer
109 views

Batch Processing Quick Query

I have like 50000 records that meet my condition for batch processing. My batch process begins at say 10:01 AM and ends at 10:10 AM. I set my batch size to be 200. Can someone tell me what would ...
1
vote
1answer
228 views

System.CalloutException: Callout from scheduled Apex not supported. Any suggestions please

i have created a schedulable class which has to trigger a batch job. The run method for the batch class will get list of data to process from a webservice callout. Now, i got the exception below. Any ...
0
votes
1answer
47 views

Got an error when deploying trigger into production

I wrote Scheduler class and Apex trigger and deployed Scheduler class successfully from sandbox to production but when i deploy trigger from sandbox to production then I got an error. Trigger: ...
3
votes
1answer
60 views

Schedule Job does not execute

Since last Wednesday one of my schedules jobs (future calendar) does not execute but it schedules next time.I tried to remove and create again the job but was the same. If I execute the Batch manually ...