Gravity Forms Schedule Entries Export

This plugin is the add-on for the Gravity Forms plugin. With the add-on, you can set a scheduled task and export any Gravity Forms entries to the CSV file. Also, the file can be sent to the given email address list.
So if you have a form collecting user submissions, the add-on can send exported entries automatically to your email (by a schedule).

How it works?

Create a form on your website (using Gravity Forms plugin), then just collect information submitted by your customers. All users data are saved as entries.
On the following screenshot you can see the Test form and the form’s entries.

The example form has just three records. However, in the real form, you can get a lot of entries daily.
Therefore you may want to schedule an email and receive it automatically with the attached file that includes the entries.
To do that just go to the Form Setting page and click on “Schedule Export Entries” tab.

You will see “Schedule Export Entries Feeds” page for the form. Just click on a “Add New” button and create a new task to export the entries automatically. Also you can see the “Current time” value on this page. It should help you to create task, because website current time and your local time on computer can be different. The plugin works with website time.

Please look at screenshots below there is an example of the new task Setting page.

You can set up to get the exports to your email. Also It’s possible to set several email addresses.

Also it’s possible to allow saving the export file on your server. Tod do that just set a export folder. By default plugin use the website root folder. You can change it. Once you save the changes, the plugin checks whether the folder is writable.

Please note you need save your task. After that you are done and your task will be executed on a schedule.

The new task Setting page Fields

As you can see in the previous screenshots, there are different fields to configure your task. Lets dicuss each one:

  • Name – required field, enter some unique name to indetify your task.
  • Export Schedule – required field, set how frequently the entries are exported and emailed..
  • Custom Start Date – Set the custom start date when the first export should be done (for minute, hourly and daily schedules only)
  • Export Time Frame – required field, set a time frame within which the entries should be selected..
  • To Email Addresses – enter a comma separated list of email addresses you would like to receive the exported entries file.
  • From Email Address – enter the email address you would like the exported entries file sent from.
  • From Email Name – Enter the email name you would like the exported entries file sent from. You can leave it empty to use the default name.
  • Message – enter a message for the export email.
  • Form Fields – required feield, select the fields you would like to include in the export.
  • Condition – set conditional logic that must be met before sending the export.
  • Enable email CSV – send the email after the export is done.
  • Save CSV on your server – save the export data on the server in a file
  • Directory on your server – set a directory on your server when the export file should be saved; the path should be relative from your website root.

Linux Cron Job vs. WP-Cron

Have you ever noticed that your scheduled posts in WordPress are missing? Though WordPress has its own cron feature that dictates the scheduling of your blog’s posts and events, WP-cron is not a literal cron job.
Linux cron jobs can be controlled by the user, making certain that the items constrained by schedule are run appropriately. Also, for a high-traffic WordPress site, a Linux cron job can assist with reducing the chances of downtime by lowering the bandwidth on the server, thus using less server resources.

WP-cron is a virtual cron that only works when the page is loaded. WP-cron is first loaded by WordPress when a page is requested on the front or backend of a site at which point WP-cron displays the necessary page to the site visitor.

How to Replace WP-Cron With a Linux Cron Job

The best way to optimize the efficiency of your WordPress cron jobs is to disable WP-cron and set up a normal cron job through cPanel which will run every hour.

  1. Disable wp-cron.php You can disable WP-cron by modifying the wp-config.php (located in the folder where WordPress is installed). Open the wp-config.php file, add a new line after <?php, then add the following code on the new line: define('DISABLE_WP_CRON', true);
  2. Disable wp-cron.php
  3. To set up a Linux cron job:

    • Log into your cPanel.
    • In the Advanced section, click Cron jobs.
    • Under Add New Cron Job, select the time interval. We recommends that you do not set the interval lower than 15 minutes.
    • Set the cron command to the following, replacing yourwebsite.com with your actual domain name:wget -q -O - http://yourwebsite.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
    • Click Add New Cron Job to set the cron.
In order to test out the new cron, simply wait for the elapsed time period for the cron to run. In the event that the cron does not run, please review the steps listed above to ensure that you have completed all steps correctly. </li> </ol> 

### **When exporting to CSV, I do not receive the emails? Why?** {#item-description__when-exporting-to-csv-i-do-not-receive-the-emails-why}

If you have problem with getting the emails, please make sure you have enabled the **Enable email CSV** option. Also note the email will be sent if the export includes at least one entry. If you have checked all options, but emails are not received, please send the request to your hosting/server&#8230;