Scheduled Batch Jobs
  • 03 Apr 2024
  • 5 Minutes to read
  • Dark
    Light

Scheduled Batch Jobs

  • Dark
    Light

Article summary

Do Not Delete

Blackthorn | Events Subscriber Dock, a new, internal Scheduled Job, was added to the Events app. Please do NOT delete this Scheduled Job from your org.


Change to Schedule Recommended Payment Jobs

For existing users, clicking Schedule Recommend Payment Jobs will no longer trigger the “Blackthorn | Payments Transaction Rollup To Parent” scheduled job. Instead, you will need to click the Schedule Transaction Rollup to Parent Job button.

Jobs can be scheduled to run together in a batch or run manually on their own. To manually trigger a job, go to the Batch Jobs or Scheduled Jobs tab from the Blackthorn | Payments Admin tab and click the relevant button.

Jobs that have been scheduled can be seen by going to Setup > Jobs > Scheduled Jobs. All job names start with Blackthorn | Payments.


The following is a list of batch jobs we schedule once you complete the Setup Wizard and click the Schedule Recommended Payment Jobs button on the Scheduled Jobs tab.

Which time zone does the process use when running a scheduled job?
Per the Salesforce Apex guide, "The `System.schedule` method uses the user's timezone for the basis of all schedules."

Blackthorn | Payments Balance Update

  • Runs nightly at 2:00 am.
  • Updates any available and pending Stripe balances for all Payment Gateways and Connect accounts.
  • The Update Balances button is located on the Blackthorn | Payments Admin’s Batch Jobs tab.

Blackthorn | Payments Billing Balance Rollup

  • Runs nightly at 4:00 am.
  • Updates balances on Invoices (Blackthorn Invoices and Stripe Invoices) from related and captured Transactions.

Blackthorn | Payments Daily Captures

  • Runs nightly at 12:00 am.
  • Processes scheduled charge Transactions with Due Date = “TODAY”.
  • The Process Scheduled Charge Transactions Now button is located on the Blackthorn | Payments Admin’s Batch Jobs tab.

Blackthorn | Payments Daily Captures (Authorized)

  • Runs nightly at 12:00 am.
  • Processes scheduled authorized Transactions with Due Date = “TODAY”.
  • The Process Scheduled Charge Transactions Now button is located on the Blackthorn | Payments Admin’s Batch Jobs tab.

Blackthorn | Payments Daily Refunds

  • Runs nightly at 2:00 am.
  • Processes scheduled refund Transactions with Due Date = “TODAY”.
  • The Process Scheduled Refund Transactions Now
    button is located on the Blackthorn | Payments Admin’s Batch Jobs tab.

Blackthorn | Payments Log Record Cleanup

  • Runs nightly at 12:00 am.
  • Deletes any Blackthorn Log records that were created 30+ days ago.
  • If you have a large number of Blackthorn Log records to delete immediately, execute the following code in the Salesforce Developer Console. It will delete everything except for records created within the last five days. However, since this job deletes only 10,000 records at a time, you may need to execute the code multiple times.
Integer daysToKeep = 5;
bt_stripe.BlackthornLogService.deleteOldBlackthornLogRecords(daysToKeep);

Blackthorn | Payments Query Number Managed Package Users

  • Finds the number of Payments and Events users based on permission set assignments and then updates the LMO.

Blackthorn | Payments Set Payout

  • Runs nightly at 4:00 am.
  • Connects completed Payout records with related Charge and Transfer (Stripe Connect) records.
  • The Process Payment Balance History button is located on the Blackthorn | Payments Admin’s Batch Jobs tab.

Blackthorn | Payments Webhook Record Cleanup

  • Runs nightly at 12:00 am.
  • Deletes successfully processed Webhook Event records.

Blackthorn | Payments Webhook Record Processing @ 0

  • Runs at the top of each hour (12:00, 1:00, 2:00, etc.) and schedules a new job to run five minutes after the last batch run finishes.
  • Processes Webhook Event records.

Blackthorn | Payments Transaction Rollup To Parent

  • Runs every 30 minutes.
  • Updates a Transaction’s parent records with the (child) Transaction's summary. This includes Payouts, Captures, Transfers, Refunds, and the Total fields on the parent record.
  • The Schedule Transaction Rollup To Parent Job button is located on the Blackthorn | Payments Admin's Scheduled Jobs' tab.

Blackthorn | Payments App Guidance

  • Sends metrics about the use of in-app guidance to Revenue Hero.
  • Included in the Recommended Scheduled Jobs.
  • Runs the AdoptionMetricsDataBatch job.
For new installations, the following changes were made to the “Blackthorn | Payments Transaction Rollup To Parent” scheduled job.
  • After installing Payments, the "Blackthorn | Payments Transaction Rollup To Parent" scheduled job will no longer be automatically scheduled.
  • To opt-in to the “Blackthorn | Payments Transaction Rollup To Parent” scheduled job, the Payments Admin will need to go to the Blackthorn | Payments Admin page and click the Schedule Transaction Rollup to Parent Job button.
  • If Disable Trans Rollup to Parent is set to “True” in Blackthorn Pay - Trigger Settings and “Blackthorn | Payments Transaction Rollup To Parent” is scheduled, then real-time rollups do NOT run, but the scheduled batch job DOES run every hour to process rollups.

NOTE: For existing users, clicking Schedule Recommend Payment Jobs will no longer trigger the “Blackthorn | Payments Transaction Rollup To Parent” scheduled job. You will need to click the new Schedule Transaction Rollup to Parent Job button.


The following batch jobs will be schedule if Blackthorn Pay - Features custom setting has the Billing Valid Through with a future date. (Stripe Billing batches)

Blackthorn | Payments Send Stripe Invoices

  • Runs daily at 6:00 am.
  • Sends an Invoice to a customer when Send Invoice On Date = "TODAY".

Blackthorn | Payments Past Due Invoices

  • Runs daily at 5:00 am.
  • Updates the Invoice Payment Status = "Past Due" when the Due Date < Today and Payment Status = "Unpaid".
  • The Update Invoices button is located on the Blackthorn | Payments Admin’s Batch Jobs tab.

Blackthorn | Payments Daily Captures – High Volume

  • Schedules the Transaction auto-charge batches using the batch size of 75.
  • Click the Schedule High Volume Transaction Job button on the Blackthorn | Payments Admin page’s Scheduled Job tab.
  • The Schedule High Volume Transaction Job button is available when the auto charge batch size exceeds 1.
  • The Schedule Billing Jobs button is visible when Stripe Billing is enabled through a future date.
  • The Schedule High Volume Transaction Job button is hidden when the batch size resets to 1.
  • When the Schedule High Volume Transaction Job button is clicked, the Blackthorn | Payments Daily Captures - High Volume scheduled job will replace the Blackthorn | Payments Daily Captures job and will run at midnight.

How do I change the scheduled job/apex job user?

Before making any changes, please ensure that the person scheduling the jobs has Admin (Blackthorn | Payments (Admin)) access to Payments. The steps below will delete the current scheduled jobs and user and reschedule the jobs to run under the user who clicks the button. 

  1. Go to the Blackthorn | Payments Admin tab. 
  2. Click the Scheduled Jobs tab.
  3. Click Schedule Recommended Payment Jobs


What's Next