Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

Questions tagged [schedulebatch]

Class than can be scheduled to run at a certain time and invoke a batchable class

Filter by
Sorted by
Tagged with
1 vote
1 answer
55 views

I need to create a batch class that summarizes all Opportunity Amounts for each Account;

An email should be sent to the primary contact of all Accounts, containing a table with the Closed Won/Open/Closed Lost summarized Opportunity Amounts, but no matter how much i try and change the code ...
Florin Hreniuc's user avatar
0 votes
1 answer
39 views

CSV report generation using apex batch

I am trying to generate the csv report by fetching the data from ApexTestResult obj. But the column 'message' in the apextestresult obj is overlapping and automatically divided the message and showing ...
RKCY's user avatar
  • 323
0 votes
2 answers
46 views

Test Class coverage on execute method of Batch Apex which is Scheduled to run at specific interval of time

I have a Batch class, which queries Lead records that were created 1 day before. I have created a custom Label 'More_Than_1_days' which has the value 1. I was using this custom label in that batch ...
Mohd hasim's user avatar
1 vote
3 answers
683 views

I am trying to schedule a basic batch class with a CRON expression which schedules it for every 5 minutes everyday

I created a basic batch class. global class MyBatchClass implements Database.Batchable<sObject> { global Database.QueryLocator start(Database.BatchableContext bc) { return Database....
Uday Chandel's user avatar
-1 votes
1 answer
131 views

Can we do a callout inside for loop in batch class

Callout class Public class calloutValidation{ public static string CalloutCheck(String Email{ try{ //There are some logic HttpRequest req = new HttpRequest(); ...
SFL's user avatar
  • 1
1 vote
0 answers
32 views

How to do automation install package after sandbox created [duplicate]

Im trying to do continues deployment everytime sandbox refresh. But it was work fine if trigger via Developer Console (via personal account) But there is nothing happen/run if trigger via Automation ...
vctqs1's user avatar
  • 75
0 votes
0 answers
38 views

Apex CPU limit exceeded on Batch start method

I have an scheduled batch that processes records but I'm hitting CPU limit exceeded error on start method. This is my code (SortLogicBatchQuery retrieves ~500000 records): public BatchSortProjects(){ ...
molinet's user avatar
  • 925
-1 votes
1 answer
480 views

How to delete records and related records dynamically from SObjects

My Production org is almost full I need to delete Objects data and their related objects data based on SObjects mentioned in custom metadatatype. I have written code to delete SObjects and related ...
jagadeep's user avatar
-1 votes
1 answer
70 views

Batch Apex to add 10 Days to Closed date and then Automatically Change the Stage Name to CLOSED WON/LOST after 10 days

public class oppstage implements Database.Batchable<sObject> { public Database.QueryLocator start (Database.BatchableContext bc){ return database.getQueryLocator('SELECT Id FROM ...
Mr_Moon's user avatar
0 votes
0 answers
374 views

How to find out if a schedule triggered flow is running as a batch from the xml metadata?

This is the xml of schedule triggered flow. How to know if it is changing a batch of records? <?xml version="1.0" encoding="UTF-8"?> <Flow xmlns="http://soap.sforce....
Sandeep Pani's user avatar
0 votes
0 answers
69 views

schedulable class shows 0% coverage while trying to deploy to Production

I have a Schedulable class which calls a Batch class, I have enough coverage when checking in sandbox, But when trying to deploy to production Scheduler class shows 0% and Batch class shows 60%. I am ...
sangeetha balasubramanian's user avatar
0 votes
1 answer
411 views

Org Migration - Behaviour of batch jobs during downtime

Our org is slated to move from AP13 to AUS64 next week. The expected downtime is from 2 AM - 6 AM AEST (Sydney). Fortunately we do not have much user activity during this window but we have batch jobs ...
VPY's user avatar
  • 1,018
0 votes
1 answer
111 views

Help-Logic to check if the submitted date/time is after 2PM and skip the update of that record- Batch class

This is the sample batch class that I am working on. This class is working fine but I need to add one more condition like, If status is set to submitted after 2PM, The number field should not be ...
sangeetha balasubramanian's user avatar
-1 votes
1 answer
295 views

Help with "FIELD_CUSTOM_VALIDATION_EXCEPTION" Batch class failed to update records

I have a similar batch class and the problem is not with the logic. public class SimpleBatch implements Database.Batchable{ public Database.QueryLocator start(Database.BatchableContext BC){ return ...
sangeetha balasubramanian's user avatar
0 votes
1 answer
60 views

CPU--Limit Exception

I have written a batch which is giving APEX CPU LIMIT Exception, can anyone help. global class BatchTest implements Database.Batchable<sobject> { list<Account> AccountstoUpdate= new list&...
Ritwik's user avatar
  • 1
0 votes
1 answer
92 views

How to schedule a batch class every third Sunday of a month at 12:00 lunchtime Central US Time zone

How to schedule a batch class every third Sunday of a month at 12:00 lunchtime - Central US Time zone - in an anonymous window? System.schedule('Batchex', '0 24 19 ? * *' , new Batchex()); I used the ...
Mamatha's user avatar
  • 11
0 votes
1 answer
117 views

Test Class Showing in Code Coverage Window as Available for Coverage

a strange situation I can't find an example of elsewhere. I have a test class for a batchable apex that is showing in the developer console window as available for code coverage. Haven't seen a test ...
KB2021's user avatar
  • 83
0 votes
1 answer
76 views

In the final method of batch class sending callout fails with SOQL Limit

I have a schedulable batch class which is stateful. In execute am inserting upto 1000 records. In final method i have a list of ids of inserted record global void finish(Database.BatchableContext BC) ...
Sushmitha Rao B's user avatar
-1 votes
1 answer
154 views

Scheduled Apex in waiting for more than a week

I have a couple of scheduled apex jobs which were all running smoothly. But since the beginning of this year pretty much all of them are having CronTrigger state as waiting. Some of them for more than ...
nSv23's user avatar
  • 544
0 votes
1 answer
458 views

Calling one batch class from other batch class but batch size of both batch class is different [closed]

I wanted to know whether this is possible. I have one after insert trigger and 2 batch classes. I want to call the 1st batch class from my trigger by giving batch size as 200 and I want to call my 2nd ...
Adithya Adi's user avatar
0 votes
0 answers
66 views

InstallHandler Scheduled Apex not Running

I have an installHandler running post install to create a scheduled Apex job that runs a batch Apex operation to an AWS S3 bucket. I am able to run the batch operation and run the scheduler using the ...
bswartz's user avatar
  • 27
-1 votes
1 answer
494 views

How to delay specific batch job execution

I have a scheduler class (Schedulebatchjob) that collects list of objects and calls batch job (BatchJob) for each object. I would like to delay the batch job execution if the object name is User. ...
Hemant-2's user avatar
0 votes
1 answer
512 views

How to schedule a job twice a day with different minutes?

I have a batch that does three callout and then update some records, if occurs any error in the update or in the callout, a new record in the log object with the IDs of the records that occurred error ...
Alexia's user avatar
  • 83
0 votes
1 answer
291 views

How can I get the contacts for which the email has been successfully sent in batch?

Below is my batch which sends emails to contacts based on the accounts passed in the scope. I want to mark the date on the Account on which the email has been sent to its contacts. Is there any way I ...
Deepanshu Rajta's user avatar
0 votes
0 answers
711 views

Scheduled Apex Batch job taking too long to execute

I have one batch job which delete old account associations then create new account associations & update fields[ For which logic is written in a trigger] Previously it was taking less time, it ...
Trupti Jagtap's user avatar
0 votes
1 answer
62 views

Merging two accounts if they have the same website,EIn and phone number

I am working on a batch class to merge two accounts if they have the same website,EIn and phone number. I did a code and tested with accounts having same EIN same phone number and same website and it ...
user121495's user avatar
0 votes
1 answer
347 views

Do schedule Apex stop running if there is an exception?

Do Schedule Apex execute method stop running if there is an exception (normal exception) ? Do Schedule Apex execute method stop running if there is an exception (exception has occurred in a batch ...
Vikas's user avatar
  • 113
1 vote
1 answer
1k views

AsyncApexJob returning two records for one executed instance of batch

When I am executing one batch then that batch runs only once. I have verified it from the 'Apex Jobs' from Setup. But when I am querying the AsyncApexJob for that batch class, it is returning two ...
Muskan Agarwal's user avatar
1 vote
0 answers
72 views

How to add Isactive true in fflib for Account share selector class

I need to retrieve the user or group where Isactive =true, I have added as in the code but getting error First error: Invalid field 'IsActive' for object 'Group' public List<AccountShare> ...
Vinitha Vino's user avatar
0 votes
0 answers
14 views

How to write test class for batch in salesforce [duplicate]

I have a Batch like this, how to write test class coverage 100% for it. Please help me, thanks public class StoreWorkTimeBatch2 implements Database.Batchable{ public Database.QueryLocator start(...
Bob's user avatar
  • 1
0 votes
1 answer
3k views

I want make test class for batch apex

I want create test class for this batch class and when i execute with this code i got constructor() error. BatchMessageType myClass = new BatchMessageType(); Id newId = Database.executeBatch(myClass);...
Hardik Borad's user avatar
0 votes
1 answer
706 views

how to pass the value in test class [closed]

batch class public class BillingSchemeRenewalWithoutAABatch implements Database.Batchable<SObject>,Database.AllowsCallouts, Database.Stateful { public List<Billing_Scheme__c> ...
sunny roxx's user avatar
2 votes
1 answer
771 views

When I will change a class on Production (via change set deployment), then I need to delete and add "Scheduled Job"?

I changed a class via change sets deplyment. Do I need to remove "Scheduled Job" with that class and add it again?
Fgh999's user avatar
  • 35
1 vote
2 answers
1k views

Method does not exist or incorrect signature: void schedule(String, String, BatchDeleteRecordChargeBack) from the type System

Can anything help me with this error. when my instance doesn't show the following error Method does not exist or incorrect signature: void schedule(String, String, BatchDeleteRecordChargeBack) from ...
Michel Otávio's user avatar
0 votes
1 answer
537 views

What are cons of running a batch a few times a day?

Running a batch is needed because people want to see results from the batch in the same day. Now our batch runs every night Are there any issues (for example performance issues) of running a batch ...
NonameJavaNoob's user avatar
0 votes
1 answer
43 views

Batchable query

I would like to confirm my understanding to this batchable query. So, this query runs on case records that do not equal Status field from this query? Thanks. String query = 'SELECT Id, Status, ...
Alex 's user avatar
0 votes
1 answer
1k views

Schedule Batch Apex to run batch one after another in hours gap

I have a scenario where we are having a batch apex(batch size 1000) to be schedule to run daily which perform API callouts. I need to split batches to run after every one hour means one batch for an ...
Dummy Email's user avatar
1 vote
1 answer
13k views

Resolution to this error: Attempt to de-reference a null object

I am new to Salesforce Apex coding and I am getting this null pointer exception error when i try to run a schedule batch. Please help me as i am unable to understand the mistake i made. The code is ...
Niraj Dev's user avatar
0 votes
1 answer
1k views

Apex code to get Tasks and send email to task owner

I want to send email to user about his open tasks. Each user will have more than one task. I have a set of taskIds and querying all tasks based on these IDs. How do I get email address of task owners ...
Jenina's user avatar
  • 25
1 vote
0 answers
32 views

Issue with Batch Job completing abruptly

I am trying to process 1000+ records from Custom metadata(CMDT) via a batch job. This is how my business logic runs : In my start method, I query all the records from CMDT ,In my execute method I ...
Pseudodarwinist's user avatar
0 votes
1 answer
43 views

Single record callout to run once in the near future

I am trying to find the best solution to my problem below and I'm feeling like my current solution can't be the easiest way to go about it. Let me know if I'm missing something or if this does sound ...
Mplax's user avatar
  • 63
0 votes
0 answers
104 views

Avoid Apex Schedule limit

We have a requirement to launch two schedule apex each hour but we're reaching schedule limits. I have this piece of code in apex: public void finish(Database.BatchableContext BC) { Datetime now = ...
molinet's user avatar
  • 925
0 votes
1 answer
81 views

Schedule Apex not working properly

I have a batch that schedule a job for the next hour but in my Production environment is scheduling it for the following month. public void finish(Database.BatchableContext bc) { Datetime now = ...
molinet's user avatar
  • 925
1 vote
1 answer
315 views

Batch Create Records - Creating Multiple Duplicates

I have a scheduled batch class that creates new custom object (Churn_Tracker__c) records for each Account on a monthly basis with 3 AggregateResult counts as part of each newly created record. However,...
J. Neilan's user avatar
  • 1,243
0 votes
1 answer
113 views

Batch Apex - Errors: Too many SOQL queries / Row with Duplicate ID

I am trying to create a batch class to create new custom object records related to each Account in the organization. The batch first needs to count all the Asset records for each account, where the ...
J. Neilan's user avatar
  • 1,243
0 votes
0 answers
224 views

Batch Apex Error - Row with duplicate Id

I have the below scheduled batch class to run every month. The purpose is count Asset records per Account and then create a custom object (Track__c) record for each associated account showing that ...
J. Neilan's user avatar
  • 1,243
0 votes
1 answer
197 views

Test Class for Scheduled Batch Class - Error

I have a scheduled batch class that will eventually run on the 1st of every month. It's designed to find records from an Asset that are linked to Accounts, aggregate the counts of these records into 3 ...
J. Neilan's user avatar
  • 1,243
1 vote
1 answer
1k views

Bypass/deactivate validation rules, workflow rules, process builders in apex class

We are writing batch job to update a field one of object records through batch(around 500K records). I have validation rules, workflow rules, process builders on this object which increases the batch ...
Sayali Salve's user avatar
1 vote
1 answer
606 views

Scheduler is using previous version of Apex batch

[Step to Reproduce] Create a new Apex Batch. Set a Scheduler for the Apex Batch. Update the Apex Batch. => Once the scheduler runs, the scheduler still using previous versions of Apex Batch. The ...
Yuuhi Yoshida's user avatar
1 vote
1 answer
537 views

Can I define the order when using two batches in the Schedule Class?

public class ScheduleOnProjectSum implements Schedulable { public void execute(SchedulableContext SC) { DeletedSBLBatch dsb = new DeletedSBLBatch(); try { ...
Hwang's user avatar
  • 31

1
2 3 4 5
10