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
0
votes
0answers
26 views

Execute batch from trigger if number of records in Trigger exceeds 10000?

Since we can't update more than 10,000 records in trigger in real time I was thinking of automating the update of the remaining records through a batch called from a trigger. So, Let's say for ...
0
votes
1answer
34 views

Is there ANY WAY to SCHEDULE this CODE?

private static void scheduleTEst(Set<Id> sObjectId, String cronJobDetailName, String className, Integer hour) { List<CronTrigger> scheduledExecs = [SELECT Id, CronJobDetail....
1
vote
1answer
697 views

How to avoid Apex CPU time limit exceeded error with Process Builder?

We have multiple rules setup for Case using process builder but one of the rule seems to be failing throwing CPU Time Limit Exceeded error. The process is failing at this step where i am updating ...
0
votes
1answer
21 views

4 Schedule Statements using scheduler vs scheduling a batch from finish method for every 15 mins

I want to schedule a job every 15 mins, for now I have created a scheduler class and using 4 statements to schedule it, but then again there is no guarantee that a job might complete itself in 15 mins ...
0
votes
1answer
713 views

How to call AsyncApexJob in test class from batch class finish method

here code is passed and code code coverage is not coverd, Please help me any one Test class test.startTest(); // UpdateOppToInitialize.UpdateOppToInitialize(); UpdateOppToInitialize obj = new ...
0
votes
1answer
14 views

schedule job using cron expression

How we can execute/schedule job every month's first week of saturday using cron expression. 0 0 13 * * ?
0
votes
1answer
18 views

A callout in the for loop of a batch class's execute method is causing: You have uncommitted work pending

I have a scheduled batch, that takes all cases with field isFailed__c true in the start method: global class UpdateCases implements Database.Batchable<sObject>, Schedulable, Database....
0
votes
2answers
32 views

Hourly Batch job not running as expected

We want to run a Batch job that runs hourly and updates the users to Inactive if they are logged in last 2 Hours but not 30 Minutes. The Code works fine when I run it manually and but i need to run ...
1
vote
2answers
2k views

Not able to see the class scheduled by a schedulable apex

I was looking through the scheduled jobs in my org. I would like to know which apex class is scheduled through these jobs. Please let me know how i can find this information?
0
votes
1answer
35 views

System.SerializationException: Unable to load class:

I have a scheduled class for which I'm getting this error. Apex script unhandled exception by user/organization: 0052i000001fdsd/00D2i0000003dds Source organization: 00D46000000ttrg (null) Scheduled ...
0
votes
2answers
2k views

Apex job is already scheduled for execution

Hi I am getting apex batch already scheduled error while running test class. I don't know where i am going wrong. I am calling batch class from schedule class. Apex Class global class ...
1
vote
1answer
42 views

System.SObjectException: ORA-20001 when deploying Changeset for users

I'm deploying an apex class and Test class which is running successfully and covering 84% test coverage in sandbox however when deploying it in Prod, I'm running in to below issue. I have included ...
0
votes
1answer
21 views

SOQL to Pull LastLoginDate from past 2 hours but not last 30 minutes

Here is the scenario that I'm running in to. I need to able to pull users that logged in past 2 hours but not last 30 Minutes. I tried every possible way to filter this in but since we can't Use ...
0
votes
1answer
27 views

Running in to error First error: line 1:74 no viable alternative at character '"'

I'm trying to run a batch that makes user Inactive if logged in past 2 hours. It runs in to error ": line 1:74 no viable alternative at character" when i try to run this batch. I doubt if ...
0
votes
1answer
21 views

How to query records processed between last batch job if I'm running batch class five times a day

I want to process only those records in my batch job which are updated since the last time my batch job ran. Basically, I'm running my batch job five times a day and want to process only those records ...
0
votes
0answers
34 views

Query in Batchable class not working

So We have a Batchable class that calls another apex class which used to send the renewal link for all the contracts of a particular account type. It was working perfectly fine but now we are seeing ...
1
vote
1answer
17 views

Log indicates I am going over Query row limit but only pulling 153

I was hoping someone could give me some insight on why this is failing. I think it's because the Master Inventory Object is over 300 thousand records but the thing is I'm never querying even close to ...
0
votes
0answers
20 views

Delete a schedule Job that execute a batch job after the batch is finish

We want to execute a schedule job after a change occurs in one of ours custom objects. The Idea is to execute a batch after 10 min with all the changes that occurred on that time period. For that we ...
1
vote
2answers
198 views

Invoking a flow from APEX to send email

We are writing a batch schedulable class which retrieves all the overdue task and send email to the contact in assigned to. The problem is while invoking emails from APEX we have certain governor ...
0
votes
2answers
38 views

Next Scheduled Run empty when using System.scheduleBatch in managed package

I'm trying to debug this recent issue. Code works fine in scratch orgs, but when ran in managed package scheduleBatch seems to never execute. I wonder if there's some throttling going on as we use ...
-1
votes
1answer
24 views

Dynamic Variable Scheduler Class

I'm looking to pass a variable to my scheulder class when scheduling a batch job. The idea is that I'm scheduling the class multiple times, but passing in a different variable each time. Example: ...
0
votes
1answer
17 views

Batch Apex Error - Class must implement the following methods System.ScheduleableContext)

I am trying to update a batch class to allow me to schedule it, but I am getting this error: Class must implement the following methods System.ScheduleableContext I understand the error, but given my ...
0
votes
0answers
56 views

Getting error in scheduled flow

Hi I have created a scheduled flow which will be fired before 30 days of expiration date on lead. But I am getting following error. SObjectRowId ={!$Flow.CurrentRecord} (null) Info Error Occurred: ...
1
vote
1answer
40 views

Do I have to implement the schedulable interface even if I only need it to run once and schedule a daily job?

I feel like i'm missing something basic here, I wrote a batch class that should be scheduled to run daily at a certain time of the day, forever. Do I really have to create an additional class that ...
0
votes
1answer
31 views

Scheduled end date in a custom report

I have custom report for scheduled batches i need fields included in the report Start date and END DATE of the scheduled jobs. I have checked these objects AsyncApexJob,CronTrigger,CronJobDetail but ...
0
votes
1answer
28 views

will the schedulable apex exceed if I run several call out functions in it?

for example, a schedulable that run two call-out functions like: global class scheduletest implements Schedulable { global void execute(SchedulableContext sc) { callOutFunction(a); ...
0
votes
1answer
37 views

Is it possible schedule an apex job to run several times everyday but during an interval time? [closed]

I am quite confused about the CRON expressions. I would like to run a job several times every day but in a time interval. For example: Every day run X job every 2 minutes from 3:00 am to 4:00 am. If ...
0
votes
0answers
20 views

Future method cannot be called from a future or batch method on Scheduled job

I have found this issue when trying to do a callout from an scheduled job and I can't get it to work properly. Schedule class: global class TM_LATAMCargaModeladoSchedulable implements Schedulable { ...
1
vote
1answer
40 views

Test Class Id Error

I trying to get better and have built a trigger/test class using my knowledge I have learned however I am running into an error with the test class that for some reason I just cannot resolve and ...
0
votes
1answer
37 views

Encountering Constructor not defined in test class

I'm scheduling a batchable class that deletes records from a custom object. The test class for my scheduled class saves without errors. However, I'm getting a "Constructor not defined: [...
15
votes
3answers
25k 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, NextFireTime,PreviousFireTime,State,StartTime,...
7
votes
1answer
105 views

Scheduled Apex with one-time execution not being executed

We have a number of Scheduled Jobs that are scheduled with repeat and these are all working fine. We have a handful of Scheduled Jobs that are dynamically scheduled and re-scheduled, either as one-...
4
votes
1answer
2k 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 ...
3
votes
1answer
5k views

Batch apex execute method not invoked

I got a batch apex as below global class Recalculatemembers implements database.batchable<sobject> { public final string query; //Get the query in constructor global ...
0
votes
0answers
26 views

Schdeuled Batch Job Duration

I had 2 different scheduled batch classes that ran on 2 different custom objects, but both were designed to update their respective related Account records. I was running into an error that one of ...
0
votes
1answer
33 views

Testclass Schedule Batch Error - No more than one executeBatch can be called from within a test method. Unable to cover

I have Schedulable, Batch class public class Schedule_Batch_CheckUser implements Schedulable ,database.Batchable<sObject>,Database.AllowsCallouts, Database.Stateful{ public void execute(...
3
votes
1answer
414 views

Is there a way to delete >1 Million records from a custom Big Object?

First thing that came to my mind was writing a Batch Apex to do this but I get this error. System.UnexpectedException: The requested operation is not supported by this SObject Deleting via Bulk API ...
0
votes
1answer
20 views

Scheduled Batch Errors

I have 2 batch apex classes, each with a scheduler class. I am trying to run them sequentially but I am getting 2 errors on the 2nd batch class in my logs: Error #1: FATAL_ERROR|System.StringException:...
0
votes
1answer
33 views

Scheduled Batch Apex Sequentially Error

I have 2 batch Apex classes that I am trying to run sequentially. I updated my classes based on a post I saw using a custom setting (BatchSchedule) with 1 field (Scheduled_Id__c) that is et to 0. ...
1
vote
1answer
702 views

How to get the Content document Id for file that was just uploaded for a custom object

I have a requirement to allow a user to upload a csv and the system needs to process the file. I am planning to write an apex batch that is scheduled when a file is uploaded. The batch will need to ...
0
votes
1answer
42 views

Error with Scheduled Batch Classes

I have 2 batch Apex classes that update Account fields from different custom objects. I was running into issues of accessing records and found a way to run the batches in order. The test class for my ...
0
votes
1answer
20 views

Error in Test Class for Scheduled Batch Apex

I have 2 batch Apex classes that update Account fields from different custom objects. I was running into issues of accessing records and found a way to run the batches in order. The test class for my ...
0
votes
0answers
22 views

Apex batch not committing records in production but executing without errors. Also working fine in sandbox

I have an apex batch which i tested in sandbox and it is working as expected but in production it is executing without error but not committing the records. I executed the same batch code in anonymous ...
1
vote
1answer
211 views

What are the design patterns how to do a batch callout

I know some basics on callouts but would like some advice on doing multiple callouts. Requirements: I have an external system where guests are registered this could be large amounts. I have to get ...
0
votes
0answers
34 views

Covered problem for Schedule class [duplicate]

Maybe somebody has an idea why the test method doesn't cover. Uncovered method - global void execute(Database.BatchableContext BC, List<Growtivity_CM__Zorgovereenkomst_Product__c> scope) { ...
0
votes
1answer
47 views

Apex Job Execution - Multiple @future Methods in the Same Transaction

Could you please help me with the below queries related to Apex Job Execution: If multiple Async request(future methods) are fired in the same thread, it makes the Async job request status as Queued ...
0
votes
1answer
448 views

System.UnexpectedException: Start did not return a valid iterable object

I am trying to write a test method for my batch class so I can deploy it, but I am getting this error. System.UnexpectedException: Start did not return a valid iterable object. The batch class looks ...
0
votes
0answers
35 views

Calling a managed class (in vlocity) in a batch class APEX

Is it possible to make a batch class then call a managed class from the vlocity? I'm trying to do this but I don't have an idea how to start it since I couldn't see the parameters needed for that ...
3
votes
1answer
596 views

Batch-sends based on triggers using TriggeredSendDefinition

Here is my questions: Possibility to use a different lists to be associated with the triggered type of sends in Exact target? Every time at least one subscriber has to be associated for the ...
0
votes
0answers
25 views

How can I find out what “uncommitted work” is allegedly pending?

I have two schedulable batch processes, identical in every way except one is for Opportunity and the other is for Appointment__c. In real life, both batch processes work exactly as expected, which is ...

1
2 3 4 5
9