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
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
13 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
31 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
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
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
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 ...
0
votes
2answers
35 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
23 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
54 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
36 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: [...
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
32 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(...
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
32 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. ...
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
21 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 ...
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
45 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
435 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 ...
7
votes
1answer
104 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-...
0
votes
0answers
32 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 ...
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 ...
0
votes
0answers
21 views

Dynamically Scheduling Apex to Run at Various Points in Time for different set of records [duplicate]

My use case is that our Salesforce org will do callout to external system at different times of the day. All these data are stored in a custom object, which basically stores the external system URL ...
-2
votes
1answer
41 views

Is there any alternate ways to handle string in a better way in the below batch class. I feel it looks ugly? [closed]

global class batchFileUpdate implements Database.Batchable<sObject>{ global Database.QueryLocator start(Database.BatchableContext BC) { string reseller= 'RENEWAL_RESELLER'; ...
0
votes
1answer
44 views

How do I query on user object to pull out records that they are involved in 5 unrelated objects?

I'm new in Apex, I'm running a schedule apex to send out email notification to Assigned_Reviewer__c on Custom object called "Patient relations Review" if the record status is "In ...
0
votes
1answer
686 views

Schedule Apex Class — Error: You must select an Apex class that implements the Schedulable interface

Has anyone ever come across this error while attempting to schedule a Schedulable Apex Class? Error: You must select an Apex class that implements the Schedulable interface. I had previously been ...
0
votes
0answers
21 views

Contact Duplicate error not fired while upserting duplicate Contacts in bulk in apex

We have a Duplicate Rule defined on Contact Object. The requirement is to insert or update Contact records in Batch apex. Ideally, if any duplicate is found I should get Duplicate Error in apex. While ...
2
votes
1answer
49 views

Batch Start Method Best Practice: DML/Scheduling?

During some solutioning design, my team has come across some complexity around batch scheduling. In order to maintain performance, we've been asked if it is okay to schedule the follow up batch in the ...
0
votes
0answers
187 views

Automated Process has no Access to Connect API - System.NoAccessException: Insufficient Privileges: The Connect API is not enabled for this user type

I have a batch that does callouts. This batch when I tried to schedule, gave me an error "Callouts not supported from Schedule class". I thought about the future, but that does not work as ...
1
vote
1answer
35 views

Error- Class UpdateFutureCasesToNewStatus must implement the method: System.Iterable<Case> Database.Batchable<Case>.start(Database.BatchableContext)

Trying to get batchable class setup. Getting Error: Class UpdateFutureCasesToNewStatus must implement the method: System.Iterable Database.Batchable.start(Database.BatchableContext) global class ...
0
votes
0answers
23 views

Error deploying changeset in test class using Test.loadData [duplicate]

I'm trying to apply changeset to an org, but the following line of code in my test class: List<sObject> cmpn = Test.loadData(Campaign.sObjectType, 'testCampaigns'); and others similar to it, ...
0
votes
0answers
42 views

SendEmail does not save activity - INVALID_ID_FIELD, SaveAsActivity is not allowed with whatId that is not supported as a task whatId

I am sending an email using batch class and want to save it as activity. But getting following error: INVALID_ID_FIELD, SaveAsActivity is not allowed with whatId that is not supported as a task whatId....
1
vote
1answer
26 views

Please clarify my below doubt on batch execution sequence

I have batch class, basically it will query on account records where Account_Status__c is empty(Account_Status__c='') then it will create contact for such accounts then Account.Account_Status__c field ...
0
votes
2answers
431 views

CRON Expression for specific time [closed]

How to schedule batch class to run at specific time 12.30 AM CST Daily. How to make it run at CST Timezone.
0
votes
0answers
36 views

Apex Class that runs queries and updates a custom object

I created an apex class that acts queries fields and updates a custom object but it is timing out when I try to execute it in the anonymous window. It is still in the sandbox but I don't want to ...
0
votes
0answers
198 views

How to get the class Name that created a scheduled job?

I have a list of scheduled jobs with me for which I want to find out the class Name associated to it. I was able to get the list of all the classes that uses the schedulable interface, but I want to ...

1
2 3 4 5
9