Skip to main content
Version: 1.24

Scheduled Job

This article explains the scheduled receipt job: how to set it up, which gifts it creates receipts for, and which receipts it emails.

What the Scheduled Job Does​

The scheduled job receipts new single gifts automatically, without anyone opening Batch Receipts. Each run:

  1. finds recent opportunities (or payments, when receipting by payment) that are ready for a single receipt,
  2. creates their receipts and PDFs, and
  3. if you chose the Create receipts and email them option, emails the receipts issued today or yesterday that are waiting to be emailed.

It is meant for day-to-day receipting of new gifts. Consolidated receipts, recurring donations, back-dated gifts and year-end runs are still done with Batch Receipts.

Setting Up the Job​

Open the Receipt Settings tab and select Scheduled Jobs. You need the Receipt Admin permission set to see this page.

OptionChoices
How often should the job run?Every 10 minutes, Every 30 minutes, Every hour, Every 12 hours, or Every day (the default).
When should the job run?Only asked for Every 12 hours and Every day. The hour the job runs, in your own Salesforce time zone. Every 12 hours runs at this hour and again 12 hours later.
ActionCreate receipts only, or Create receipts and email them.

The shorter frequencies don't ask for a time. They run on fixed clock marks in your time zone:

  • Every 10 minutes: on the hour and every 10 minutes after (8:00, 8:10, 8:20…).
  • Every 30 minutes: on the hour and the half hour (8:00, 8:30, 9:00…).
  • Every hour: on the hour, every hour of the day.
Frequent runs can block other receipting

Only one run of each kind can happen at a time in the org. If the job runs often, for example every 10 or 30 minutes, it may stop Batch Receipts and similar actions, such as the New Receipts button on a list view, from running while it's busy.

Click Schedule. The page then shows the job's details instead of the form: its action, frequency, Scheduled Job Limit, next and previous run, created date, created by, time zone and status.

Scheduled Job Limit shows which gifts each run looks at, as "Today only", "Today and yesterday" or "Today and the previous N days". See Which Gifts Get a Receipt.

Click Refresh to update the details, for example after changing Scheduled Job Limit. To change the frequency, time or action, click Delete and schedule the job again. You can have only one scheduled job.

Run It as Someone Who Can See Everything​

The job runs as the person who scheduled it, and only selects gifts and receipts that person can see in Salesforce.

Schedule it as a user who can view all the records it needs, such as a System Administrator. If that user is later deactivated, the job stops running. Delete it and schedule it again as another user.

Which Gifts Get a Receipt​

Each run picks up:

  • When Receipt by is "Opportunity": opportunities with a Receipt Status of "Eligible" and a Payment Date within the look-back period.
  • When it's on: payments with a Receipt Status of "Eligible" and a Payment Date within the look-back period.

The look-back period is set by Scheduled Job Limit in Receipt Settings > Advanced Settings. It is the number of days back from today: 0 means today only, 1 (the default) means today and yesterday, and 30 means the last 30 days.

The maximum is 365. A blank or invalid value is treated as 1. "Today" is in the time zone of the user who scheduled the job. See Receipt Settings.

When Enable Index Optimization is on, the job selects opportunities using the indexed copies of Receipt Status and Payment Date, like Batch Receipts. Run App Utilities > Refresh Indexed Fields if a gift looks eligible but isn't picked up.

Gifts that are "Eligible for Consolidated", including the gifts of recurring donations, are left for Batch Receipts. Once a gift is receipted its Receipt Status changes, so a later run doesn't receipt it again. The Receipt Eligibility article explains the statuses.

The job misses gifts older than its look-back period

With the default Scheduled Job Limit of 1, gifts with an older Payment Date aren't picked up. Raise the limit, or use Batch Receipts.

The same applies to an older gift that becomes eligible later, for example when it is marked "Paid" or its donor's address is fixed.

Raise Scheduled Job Limit to cover them, or use Batch Receipts with a date range.

Which Receipts Get Emailed​

With the Create receipts and email them option, the email step starts once the run's PDFs are all finished. If the run found no gifts to receipt, the email step starts straight away. It emails the receipts that:

  • have a Delivery Status of "To be Emailed" or "To be Emailed & Printed" (the latter are then still to be printed),
  • don't have Email Sent checked, and
  • have an Issue Date of yesterday or later.

That includes receipts created that day or the day before by Batch Receipts, the New Receipt button or an earlier run, not only the receipts this run just created.

They are emailed even on a run that creates no receipts of its own. "Today" and "yesterday" are in the time zone of the user who scheduled the job. The run's "Email Receipts" log counts only these receipts as Records Targeted.

Older receipts are never emailed by the job. Send receipts issued before yesterday from Batch Receipts > Email receipts, or with the Email Receipt button. This also applies to:

  • a receipt whose email failed, or that didn't fit within the Daily Email Limit, once its Issue Date is more than a day old;
  • receipts issued two days before a run, when the run in between was skipped;
  • a receipt whose Issue Date was changed to an earlier date.

How the emails are sent:

  • Emails go through Salesforce or Dryad Mailer, as set in Send Emails Using.
  • Each email uses the receipt's email template and sender address, and has the receipt's PDF attached. The Email Setup article explains who receives the email.
  • Through Salesforce, the app checks the Daily Email Limit and the email allowance Salesforce has left before each group of emails. Receipts that don't fit stay "To be Emailed" and are picked up by a later run while their Issue Date is still today or yesterday.
  • Through Dryad Mailer, the run adds all its receipts to one Email, with one Email Recipient per receipt, and the "Email Receipts" log links to that Email. The receipts are marked Email Sent once queued; whether each email was sent or failed shows on its Email Recipient. No daily limit applies.

With the Create receipts only option, nothing is emailed. Receipts wait as "To be Emailed" until you send them from Batch Receipts > Email receipts, or with the Email Receipt button on each receipt.

When a Run Is Skipped​

A run does nothing, with no receipts and no emails, if a "Create Receipts" or "Create PDFs" job started today is still running.

That includes the previous run of the scheduled job and anything started from Batch Receipts. This stops two jobs from receipting the same gifts. The next run picks up where it left off.

Before checking, the run closes any PDF segments whose jobs ended without finishing them, so a stalled job doesn't block it for good.

Troubleshooting​

SymptomCheck
A gift didn't get a receiptCheck its Receipt Status is "Eligible" and that its Payment Date was within the Scheduled Job Limit days (1 by default: today or yesterday) when the job ran. Otherwise, raise the limit, or receipt it with Batch Receipts or the New Receipt button.
No logs at the time the job should have runLook for a "Create Receipts" or "Create PDFs" log from today that is still "In Progress". If its job has ended, opening a create, email or merge action on the Batch Receipts tab closes it. Check the job's status and next run on the Scheduled Jobs page, and that the user who created it is still active.
Receipts were created but not emailedCheck the job's action is Create receipts and email them. Open the receipt: its delivery status must be "To be Emailed" or "To be Emailed & Printed". "Missing" means it has no PDF; the job only creates PDFs for its own receipts. "To be Printed" means the donor doesn't prefer email, or the receipt is missing an address or email template. Its Issue Date must also be yesterday or later.
Older receipts are still waiting to be emailedThe job only emails receipts issued today or yesterday. Send the older ones from Batch Receipts > Email receipts.
Some gifts or receipts are never picked upThe person who scheduled the job may not be able to see them. Schedule the job again as a user who can see all records.