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

learn more… | top users | synonyms (1)

0
votes
2answers
37 views

Apex batch getting an error out

I have this Apex batch having issues with call. I am new in this apex-world. Can someone help me out. My code is here. global class Samplelotinactive implements ...
1
vote
0answers
25 views

Tooling API and Scheduled Batch Apex - How to access

Without storing a users credentials to salesforce how can one access the tooling API during a daily scheduled batch? Currently we are storing the users username and password in encrypted fields but ...
3
votes
1answer
54 views

Export data to a file using apex

I have a requirement to Run SELECT query on custom object export the data to csv file Automate / schedule step-1 and step-2 . I know how to achieve step-3, by using apex scheduler class. But I ...
0
votes
0answers
15 views

How to provide Scheduled Apex in Managed Pck with the risk of failing ugrades [duplicate]

You read it everywhere. Adding scheduled classes to a managed package is the safest way to big pain. Scheduled classes prevent later upgrades and the like... So what's a better way to add a cleaning ...
0
votes
0answers
55 views

Scheduling Job is not executing on daily basis

I have the same problem which this guy faced and came with a solution. I am not fully satisfied with the solution . The same happen to me that my Apex job does remain as 'Queued' and many times never ...
1
vote
1answer
24 views

Map Value gets overwritten

I have a scheduled Apex job that queries a child object and ordered by the parent Id. Then I have a for loop that groups all the child objects w/ the same parent Id into a list and then cache them in ...
1
vote
0answers
44 views

0% code coverage on apex class [closed]

Hope all is well I have the following class (see below), however i am unable to test my logic, as i am getting 0% code coverage.Can any one help me write a test class for the following class below. ...
0
votes
1answer
27 views

How can I create a campaign map that returns a list of all the campaign members associated with it?

In the Force.com Explorer I can perform the following query: SELECT Id, (SELECT Id,LeadId,ContactId FROM CampaignMembers) FROM Campaign It displays every campaign.Id in one column and the next ...
0
votes
1answer
27 views

Batch scheduler time , status and account

I'm stuck for one of the requirements . Have to check the Status , Time and Name/created by of the Batch Schedular .Have a query working for CronTrigger for this but how do i implement it through ...
0
votes
0answers
46 views

I am executing a Batch Apex class to delete the records from Recycle Bin but the records are not getting delete?

This is my code: global class EmptyRecycleBin implements Database.Batchable<sObject>{ global Database.querylocator start(Database.BatchableContext BC){ string query ; return ...
1
vote
3answers
79 views

Deploy APEX without running all tests

I have 20 scheduled APEX classes, and every time I want to change one or deploy new APEX I get an error for every Scheduled APEX test class like this: Failure Message: "System.AsyncException: The ...
0
votes
1answer
197 views

How to Close Popup and refresh parent window in salesforce?

My requirement is whenever user clicks on some custom button on child window, that window gets closed plus the parent page should be refreshed. But only child window is getting closed and parent ...
1
vote
1answer
66 views

Schedule Meeting for a Contact from Custom VF Page? Similar to Cloud Scheduler Functionality in Salesforce

Cloud scheduler in salesforce is used to schedule meetings for Contact, Leads or Account. Can the same functionality be achieved from Custom Visual force page. Either by invoking the same pop up ...
3
votes
2answers
321 views

how to pass value from visual force page (InputField) to controller?

I have created a Vf page from which i need to fetch the value of new owner and need to save the value in property defined in controller: Following is my vf page code: <apex:pageBlockSection> ...
2
votes
1answer
195 views

Class Error Unexpected token Global

I need some help, I have created the following (see below) However I am getting the following error : Error: Compile Error: unexpected token: global at line 28 column 0 I do not understand why ...
8
votes
1answer
105 views

Transferring ownership of triggers, workflows, etc

My org has an account that was used by a consultant to create various apex triggers and classes, workflows, visual force and other custom development. The higher ups want to disable this now unused ...
5
votes
2answers
925 views

How to run a scheduled job every 15 minutes?

Using the salesforce GUI it seams impossible to schedule a job every 15 minutes. Or more than once a day.
3
votes
1answer
50 views

Need System.schedule cron string for run once

Is there a way to use System.schedule to schedule a job that runs only once? I've been looking at the special characters allowed there, and I'm not seeing a way to do it. What I want to do is use ...
2
votes
1answer
45 views

Mass deletion of records through apex

Aim- I want to delete any record within custom object training__c where the created date is greater than 6 months from today's date. I would like to run this job daily. I apologise if the following ...
5
votes
1answer
107 views

Does Test.stopTest() ensure a System.Schedule/Database.Batchable completes in a test?

I am struggling to successfully test some code that is essentially the same as the code here Apex test class for schedulable class that checks for 5 batches running already. I can get the ...
4
votes
3answers
130 views

How to find/stop/disable Apex Jobs that a read-only user has activated

As a followup to this question, Contact last-modified date changed by read-only user - it appears that the source of the issue might be that a read-only user some how activated APEX batch jobs that ...
1
vote
1answer
46 views

Batch Apex to update Opportunities if the stage is closed Won

I'm want to update all Closed Won Opportunities Every Month and this is my batch apex class the problem here is it's not entering if loop but I guess if loop is proper. I'm unable to rectify where the ...
7
votes
2answers
61 views

What does the Batch Apex “Holding” status mean and where is it documented?

I've seen the following values in the AsyncApexJob table during the 'cradle to grave' life cycle of a Batch Apex job: BEFORE running: Queued Preparing WHILE running: Processing AFTER running: ...
0
votes
1answer
39 views

I am not the getting the code coverage for the following lines shown in image

Here is my schedule class : global class Scheduler_class implements Schedulable{ public static String CRON_EXP = '0 00 00 * * ?'; //Every Day at Midnight global static String scheduleMe() { ...
3
votes
1answer
139 views

Scheduling Batch class

How to schedule the batch for every two hours per day? I try like this String schedule = '0 0 1/2 * * ?'; System.schedule('Jobname',schedule,new SampleTracking()); but i don't know it ...
2
votes
1answer
37 views

How can I get the details of last schedulable job and of which class? Is there any way?

I have a requiurement where I have to get the details of last job details and the Of which clas s. How can I get the details ? i have tried using CronJob details and CronTrigger?
1
vote
2answers
53 views

Batch to batch call for inserting large data

public someClass{ public static someMethod(){ //this method is called in some batch list<sObject> slist= new list<sObject>(); //some operation //slist size ...
1
vote
1answer
177 views

Error Error: Compile Error: Loop must iterate over a collection type: SOBJECT:Order_vod__c at line 35 column 37

I wrote the below batch job. It should update the order_vod__c objects comments field with related approval comment from ProcessInstance or ProcessInstanceSteps tables. However, when saving this code ...
0
votes
1answer
31 views

Scheduled batch job from InstallHandler and further upgrades of managed package

As I understand the further upgrade can fail if we try to update the class which already has scheduled job in the managed package, right?
0
votes
1answer
33 views

Scheduled Job Does Not Seem To Be Running

I have a Scheduled Job that doesn't seem to be running, and can't figure out why. When I go to Monitor > Jobs > Scheduled Jobs, two of my scheduled jobs are the following: "Queued SMS Engine" is ...
6
votes
1answer
232 views

Future vs batch

I need to make asynch call from trigger. Records are comming (1 or 1000 at once) each minute and I need to process them from trigger asynchronously. As I see limits for future and batch jobs are the ...
1
vote
1answer
24 views

Scheduling expression

Scheduling expression is 0 0 7 * * ? which means: run every day (weekdays +weekends) each month each year at 7AM but when scheduled job is created the settings are the following:
1
vote
1answer
48 views

.Net to Salesforce Integration

I used EnterPrise WSDL for Salesforce integration. I was able to access the Account,Lead,Contacts, etc. objects. I need one help. Is it possible to get Apex Job Schedule from .Net?
20
votes
1answer
177 views

InstallHandler runs under a special ghost user. What rights does it have?

When you install a managed package with a post-install script, Salesforce creates a special ghost user under which all of the post install activities occur. I think this is undocumented. Here are some ...
3
votes
2answers
172 views

Scheduled batch “already scheduled”

I had a batch job that I tried to start. Its "startup" method that launches it checks to see if it's already running by querying the asyncjob object, then starts it only if it's not running already ...
1
vote
1answer
128 views

Make Test Class Specific to Scheduled Apex

I was wondering if there is a way to make a Test class only run for the Apex Class it's made for. Every time I want to import new classes or triggers, I have to turn off all of my scheduled Apex, then ...
4
votes
1answer
148 views

Apex scheduled job to call .net web services hosted in IIS periodically

I just wondering if someone could guide me to a document of how to perform Apex scheduled job – To call .net web service hosted in IIS of external server on a periodic basis. My requirement is every ...
1
vote
3answers
61 views

Why is this test not getting 100% coverage?

here I created scheduler class that will schedule at every 5 mins. and G1_count field will update in every 5 min. i have covered 77% of code but I want it up to 100%... I don't know what I am missing ...
-1
votes
1answer
77 views

how to test the batch code?

How to write test class for this code 75% coverage or not? global class SearchAndUpdate implements Database.Batchable<sObject>,Schedulable { global final String Query; public ...
1
vote
1answer
112 views

Re-ownership of scheduled job from managed packages

One of my orgs has a managed package in it, and was installed by a previous user, who has now been deactivated. Firstly therefore, this means I notice that on the package detail page, it is "Installed ...
0
votes
3answers
78 views

update object1 field based on object2 records

I have written this code its working but I have to write this same code in batch apex. How to do? thanks in advance. trigger rrr on Demand__c (before insert) { for(demand__c d:trigger.new){ ...
6
votes
3answers
847 views

Apex test class for schedulable class that checks for 5 batches running already

I've setup some chain execution batch classes. For this setup we decided to chain the batch classes through schedulable classes. We thought it might be a good idea to include a check for 5 batch ...
0
votes
2answers
69 views

Schedule a trigger

I have a date field on my page, and I want to invoke the trigger at the particular date and time that user selects, can anyone suggest me a way to do it thanks.
-1
votes
1answer
721 views

Batch apex class to update a field [duplicate]

The requirement is i need to write a Batch Apex Class to update Case status field to close when related tickets field status is closed. The update of status should be after 7 days of all the tickets ...
0
votes
0answers
41 views

The batch job that changes Income Timing every new quarter is not working

global class QuarterlyRollupBatch implements Database.batchable<Opportunity>{ Public Date lastDateOfThisQuarter,fiscalYearStartDate,firstDateOfNextQuarter; Public Integer quarter; ...
0
votes
0answers
276 views

Scheduled Batch Apex class

I need to write a Scheduled Batch Apex Class on two Objects Case and Ticket__c. Note: Ticket__c Has a look up to the Case. So, a case can have multiple tickets but a ticket can only be associated to ...
5
votes
2answers
81 views

System.StringException thrown when aborting a job in a rest controller

This code works in an Execute Anonymous window, but not when run from a rest controller: @RestResource(urlMapping='/scheduler') global with sharing class SchedulerController { ...
0
votes
0answers
101 views

Help writing ScheduleBatch Apex class

I have to write a Schedulebatch apex class on two objects Case Ticket__C Ticket__c has a lookup to case and a case can have many ticket records but a ticket can only be associated to one case ...
4
votes
1answer
74 views

Is there a way to load an internal Salesforce page from a scheduled batch?

My end goal is to be able to send license usage as well as data/file storage usage from clients to our org. As these values don't appear to be available directly via any API calls, I had to resort to ...
1
vote
1answer
97 views

Can a schedule be executed from future method?

One cannot execute a batch from a future annotated method. It is also impossible to have a trigger reacting to changes in future calling a batch. I cannot find if it is possible to execute a schedule ...