Checking ARB with Authorize.net Add-on

Hello,

The Authorize.net add-on is working well for me.

I notice that every evening around 7:30pm, the plugin seems to be checking in with Authorize.net to check the status of ARB subscriptions. I usually get an email notification about 7:45pm.

Here’s an entry from the log:

2022-11-30 19:27:50.226056 - DEBUG --> GFAuthorizeNet::check_status(): Checking subscription status.

Right now I just have my first and only ARB subscription.

Questions:

  1. How does it choose that time of day, and can I change it?
  2. Will it do this check-in separately for each subscription when I have many, or does it just log in once a day and check?
  3. How is this automated for any given time? (Like, is it a cron job? Does it require someone viewing the site to trigger it?)

Thank you!

I got a nice reply from Samuel at GF. Just in case anyone else has this question, I will save support staff the trouble of answering it again. Here is the info:

The Authorize.net check_status() function runs once hourly and checks for new payments for all the active subscriptions, so it would fire a single request each hour, no matter how many active subscriptions you may have.

The task is scheduled using WordPress core functions adding it to the default “Once Hourly” schedule, the cron hook name for this job is “gravityformsauthorizenet_cron”.

The time when this is fired is not set by Gravity Forms but by WordPress, and it would be the same time for any events added to the “Once Hourly” WordPress cron schedule. Therefore there’s no setting or filter from Gravity Forms side of things to change this, if you want to change the time when the “Once Hourly” schedule is fired you would need to approach it from the WordPress side of things. I’m not aware of any ready to use solution to do this.

Regards,
Samuel

1 Like

It sounds like the Authorize.net add-on you are using has a feature that checks the status of ARB subscriptions at a specific time every day. This feature is likely implemented using a cron job, which is a scheduling mechanism that allows you to specify a command or script to run at a specific time or interval.

To answer your questions:

  1. The time of day for the subscription status check is likely specified in the cron job configuration. You may be able to change the time by modifying the cron job or by adjusting a setting in the add-on.

  2. If you have multiple subscriptions, the add-on will likely check the status of each subscription separately.

  3. The automation of the subscription status check is likely implemented using a cron job, which is a built-in feature of many operating systems that allows you to schedule tasks to run automatically at a specific time or interval. The cron job is typically set up by the developer of the add-on or by someone with access to the server where the add-on is installed. It does not require someone to be viewing the site to trigger it.

I hope this helps! Let me know if you have any additional questions.

1 Like

Thank you, Faisal, for the very nice explanation. I do appreciate your help!

As Samuel noted, the add-on uses the WordPress core functions to set up the cron job. It checks once per hour and checks all ARB subscriptions at the same time.

WordPress does cron jobs a little differently, firing when someone visits the website. This is different from a true cron job that is managed by the server. There is a good article about this at cloudways.com. (I am not affiliated with them.)

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.