Specific to problems with writing, running, or testing Apex code, where code execution is initiated by scheduled Apex feature. This always includes a class that implements the Schedulable interface.

learn more… | top users | synonyms (1)

0
votes
1answer
27 views

Cron Schedule Mondays 6AM

How can I schedule this batch class to run on every Monday at 6AM? public class BatchCount implements Database.Batchable<SObject> { public Database.QueryLocator ...
12
votes
2answers
597 views

How to run Apex code every 5 minutes in 2016?

From a naive read of these questions and answers: 2012 - Are there best practices to get scheduled apex scheduled to run faster than once per hour? 2013 - What will be the cron expression for ...
2
votes
1answer
236 views

Need assistance on scheduled jobs

I have a scheduled job in my org which was scheduled 2 years ago without an end date. It runs every Friday at a specific time, which means it was scheduled using a cron expression. If I delete that ...
0
votes
1answer
39 views

Schedulable Batch Apex - Create Tasks

I'm looking to run a scheduled apex batch class that will create a task on any Contact record that had a sales rep assigned to them 1 day ago that hasn't been emailed yet. I've created 2 custom ...
1
vote
0answers
17 views

Can we send the follow up emails on the already send system email?

I have a requirement, as per which the system sends an email notification in each quarter to the Account contact for some document submission. Now, the system has to send a follow email after every 7 ...
5
votes
2answers
65 views

Scheduled Apex Class - Too many DML rows: 10001

I'm trying to schedule an apex class to run once every month to reset a number field on all Accounts to 0. global class updateMonthlyActivityCount Implements Schedulable{ public list<Account> ...
1
vote
1answer
31 views

Replicate Time Dependent / Scheduled Action Using Apex Code

I need to send an email to Contact(s) listed in my Opportunity Contact Roles, 24 hours after an Opportunity has been Closed/Lost, if the Opportunity hasn't been reopened in the meantime. So ...
0
votes
0answers
19 views

Batch is scheduled but cannot see any run logs in 'Apex Jobs'

I have a batch scheduled as can be seen in ‘Scheduled Jobs’ but somehow I am not able to see the logs in ‘Apex Jobs’ table. Therefore , I am not able to understand if the batch runs or not. I have ...
0
votes
1answer
23 views

How to schedule a job as specific user

In my requirement i have to send the custom report developed by us through email. So i have created apex scheduler class,email template and visualforce component. But when i schedule the job...there ...
0
votes
0answers
21 views

Apex Scheduler Help

I wish to write an apex class that runs 30 days after a status has been changed to Resolved this should change status field from Resolved to Closed. The reason for not using a workflow rule is ...
-1
votes
0answers
15 views

How to transfer the flat files from Salesforce to Informatica server?

How to transfer the flat files from salesforce to Informatica without using the connectors.It supposed to generate the all the objects flat files(text) should be send to the server..How can we make ...
0
votes
1answer
23 views

Apex Class Scheduler for email template

I am turning to the forum for guidance and assistance. I have been trying to figure out a a means to schedule a email to fire to for a Contact on an Account that has not submitted their Monthly ...
0
votes
0answers
16 views

Schedule Apex class code coverage at 0%

I have been working on this yesterday. I am still new to developing APEX code so go easy on me. I just need someone to point out where I am going wrong. I am attempting to create a trigger (new task ...
1
vote
1answer
31 views

How to send one email with multiple records in it

I wrote the schedule class for sending an email with lead records(It's going mail with each record) but we need to send one email(based on state) with multiple records created in lead(based on state). ...
2
votes
1answer
31 views

How To Change Apex Class into a Scheduable Apex Class

I am still a beginner and I trying to create a trigger that will create a task on a weekly basis (task once a week) until a field in the opportunity is label complete. This Trigger and Class work, as ...
4
votes
2answers
57 views

Testing scheduled apex: CronTrigger does NOT fire after Test.stopTest()

EDIT for clarification of title: CronTrigger is probably actually firing at some point in the testing process - what is wierd is that CronTrigger.TimesTriggered is NOT incrementing after ...
0
votes
0answers
10 views

How to find Process builder modified scheduled actions

I have one Time based workflow for one custom object. When i change the schedule date, the time based workflow is showing updated scheduled date as showing in these pictures This is actual date: ...
1
vote
2answers
65 views

Passing an ID into execute method in Scheduled Class

Issue is under execute method, we have a sendMailDistribution(Ids) method, here am unable to get ID. It's giving an error like NullPointerException, am unable to rectify this. Can you please help me? ...
1
vote
0answers
28 views

Get the number of Opportunities for each User in the org (the count must include the records to which the User has atleast read access)

I need to get the count of Opportunity record for every User in the org where the User has atleast read access on the Opportunity record. I need to store the data obtained per User for every month in ...
1
vote
3answers
26 views

How to Re-Create Scheduled Jobs After Deleting Them

I need to make some changes to a schedulable class that inserts Case Share objects for our custom permissioning model. When trying to make changes to the class, the error is thrown that the class has ...
0
votes
1answer
39 views

Which Scheduled Job will run first?

I have two different Apex Jobs scheduled at 12:00 AM as shown below: Which job will run on next day? Will both jobs run one after another or only one job will run on next day? Both jobs refer to ...
0
votes
1answer
31 views

Cover Test Class with ContainsKey and KeySet Map Method

How do i cover containskey() and keyset() method? i only cover 68% of my code. here's my class here's my test class @isTest private class testCheckPickedLead{ static testMethod void ...
0
votes
1answer
30 views

How Process builder schedule actions works

I have few schedule actions of Process Builder. The process is going to fire based on one Boolean record when that made true. I scheduled 100 days before expiry date. Now if i want change expiry date ...
2
votes
1answer
57 views

Batch Apex vs Regular Apex

We have a nightly job that will update opportunities for every record in a custom object. Since that custom object will contain only the "updates in the last 24 hrs", we do not expect the volume to ...
3
votes
1answer
29 views

Error in schedulable test class

Can any one help me out in writing the test class for the Schedualble class.I have written a test class but the system throws an error : Error: Compile Error: This schedulable class has jobs pending ...
2
votes
2answers
44 views

Possible to create a workflow to check field criteria after X time?

Requirements: I have a custom object with a boolean field that will always be set to false on creation. Within a given time interval, that field could be changed to true. When the time interval is ...
0
votes
1answer
54 views

Query Activities on Lead

i need to query activities on lead. the idea is i want to get which lead has 10 activities with "unreach" subject and automatically change it to unqualified. i will use scheduled apex to daily check ...
1
vote
1answer
16 views

Execute queue in certain hours only

How can I modify this class to execute only within office hours? public with sharing class AddLeadQueue { public void AddLeadQueue() { System.debug('loaded'); } @future (callout ...
3
votes
1answer
40 views

Is there any way to schedule dashboard refresh at schedule time [duplicate]

I am trying to implement a process which can help me in refreshing the dashboard after one hour. I have tried using salesforce process builder but that too depends on having an activity.Please do ...
4
votes
3answers
139 views

Invalid field when using template, even though the field isn't set by me

I have an Apex class that runs every ten minutes and sends emails for some opportunities that were created in the system. Or at least, that is how it should work, but I'm getting an ...
2
votes
2answers
38 views

Email reminders per week

Please tell me the which aspect of salesforce should I use to implement this: I need to send reminder to the owner of a record as the end date of that record is nearing. I need to send one email per ...
2
votes
3answers
66 views

Both Apex Flex Queue and Scheduled Jobs used up

The system has batch call out APEX classes to sync Salesforce information with another Email sending provider, Active Campaign. Every time we insert or update a custom lead or custom opportunity, the ...
1
vote
1answer
22 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
98 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
92 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
37 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
93 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
38 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
9 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 ...
1
vote
1answer
60 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. ...
1
vote
0answers
22 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
33 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
23 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 && ...
2
votes
0answers
107 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
85 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
67 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
20 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
71 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
68 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
137 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 ...