BoldMinded Docs
  • Overview
  • Advanced Categories
    • Docs
      • Installation
      • Requirements
      • Setup & Configuration
        • Hidden Config Options
        • Multi-Site Manager
      • Template Tags
      • FAQs
  • Ansel
    • Docs
      • Installation
      • Upgrading
      • Requirements
      • Settings
      • Usage
        • Channel:Form
      • Troubleshooting
      • Template Tags
    • FAQs
  • Bloqs
    • Docs
      • Why Bloqs?
      • Features
        • Add Bloq Menu
        • Nesting
        • Cloning
        • Drafts
        • Bloq Usage
        • Deprecated Bloqs
        • Caching
        • Profiling
        • Bloq Components
        • Bloq Groups
      • Installation
      • Requirements & Compatibility
      • Setup & Configuration
        • Hidden Config Options
      • Creating Bloqs
      • Template Tags
        • Twig
        • Examples
      • Context Variables
      • Add-on Developers
    • FAQs
  • Carson
    • Docs
      • Installation
      • Requirements
      • Fields
        • Omni
          • Hidden Config
        • Assistant
        • SEO
      • Troubleshooting
  • Custom System Messages
    • Docs
      • Installation
      • Requirements
      • Variables
      • Template Tags
  • DataGrab
    • Docs
      • Installation & Upgrading
      • Requirements
      • Troubleshooting
      • Configuring Imports
      • Running Imports
      • Automatic Imports
        • Importing with cron
        • Importing with cron (Deprecated)
      • Endpoints
      • Configuration Options
        • Config File Options
        • Increasing PHP memory limit
      • Import Types
        • CSV
          • Importing into Grid or Matrix field
        • JSON
          • Example file
        • WordPress
        • XML
          • Example file
        • Creating your own import type
      • Assigning Authors
      • Field Types
        • Assets
        • Ansel
        • Bloqs
        • Calendar
        • Channel Images
        • Date
        • File
        • File Grid
        • Fluid
        • Grid
        • Low Events
        • Relationships
        • Simple Grids & Tables
        • Tag & Tagger
        • Matrix (Deprecated)
        • Creating your own fieldtype
      • Publisher
      • Version 5.0
      • Version 6.0
    • FAQs
  • Feature Flags
    • Docs
      • Installation & Upgrading
      • Requirements
      • Configuration
      • Template Tags
      • A/B Testing
    • FAQs
  • Fluidity
    • Docs
      • Installation & Upgrading
      • Requirements
      • Configuration
      • Demos
    • FAQs
  • Logit
    • Docs
      • Installation
      • Requirements
      • Configuration
    • FAQs
  • Publisher
    • Docs
      • Installation
      • Requirements
      • Issues & Tips
      • Languages
      • Template Tags
        • Forms
        • Email Notification Templates
        • Channel:Form
        • Twig
      • URL Translations
      • Auto Translations
      • Diffs
      • Drafts
      • Categories
      • Phrases
      • Persistence
      • Performance
      • Add-ons
        • First Party
        • Third Party
      • Hidden Config
      • Extending Publisher
    • FAQs
  • Reading Time PRo
    • Docs
      • Installation
      • Requirements
      • Configuration
      • Template Tags
  • Reel
    • Docs
      • Installation
      • Requirements
      • Settings
      • Field Tags
    • FAQs
  • Simple Grids & Tables
    • Docs
      • Installation
      • Requirements
      • Template Tags
      • CSV File Imports
      • Field Settings
      • GraphQL
      • Advanced Configuration (deprecated)
    • FAQs
  • Sitemap
    • Docs
      • Installation
      • Requirements
      • Configuration & Usage
    • FAQs
  • Snaptcha
    • Docs
      • Installation
      • Requirements
      • Configuration
      • Template Tags
      • Developers
    • FAQs
  • Speedy
    • Docs
      • Installation & Updating
      • Requirements
      • Configuration
      • Template Tags
      • Static Caching
        • Real World Example
      • Frontedit Support
      • Control Panel
      • Migrating from CE Cache
      • Diagnostics
      • CLI Commands
      • Reverse Proxy Purging
    • FAQs
  • Trek (unreleased)
    • Docs
      • Configuration
    • FAQs
  • Queue
    • Docs
Powered by GitBook
On this page

Was this helpful?

  1. DataGrab
  2. Docs
  3. Automatic Imports

Importing with cron (Deprecated)

Old method of importing with cron using the ACT url.

Last updated 18 days ago

Was this helpful?

This method of importing with cron is no longer supported. Importing with the ?ACT urls still works, and if you are having success with this method feel free to continue to use it, but we will not be offering add-on support for this method. We highly recommend using the

What is cron?

cron is a service available on Unix-based servers that can execute commands at regular intervals.

How to set up ExpressionEngine

In order to activate a DataGrab import, you will need to simulate a visit to a URL. If you want to run a single import, or a small number of imports, the easiest method is to use DataGrab’s import action.

To run a single import, the url to access is can be found from the DataGrab module’s front page, and is in the form:

http://example.com/index.php?ACT=20&id=123

Your value for ACT= might be different from 20. The value for id= is the id of the saved import you wish to run.

Visiting this URL in a browser will run the specified import.

An alternative method, which is more useful if you have a number of imports to run, is to create an EE template and use a tag to select the import to run. Inside this template, add the tags as follows:

{exp:datagrab:run_saved_import id="2"}
{exp:datagrab:run_saved_import id="9"}

This would run the import with id=2, followed by the import with id=9. You could add as many imports as you wish.

To run these imports, you would need to visit this URL. So if your template group was ‘feeds’ and the template name ‘batch’, you would go to:

http://example.com/index.php/feeds/batch

Setting up cron

Depending on your web hosting, you may need to set up cron jobs through the command-line or through a web-based back-end like cPanel or Plesk.

I won’t go into detail here on each individual method. The key to setting it up correctly is to remember that to run an import you need get cron to visit a webpage on your site.

In order to do this, you’ll need to use one of the following commands (replacing the URL to your URL):

/usr/bin/wget -O - -q -t 1 "http://example.com/index.php?ACT=20&id=id"

curl --silent --compressed "http://example.com/index.php?ACT=20&id=id"

/usr/bin/lynx -source "http://example.com/index.php?ACT=20&id=id"

These are 3 alternative options (note: you only need to use one of them) to do the same thing. You might find that your webhost might not have, say, lynx, installed, in which case you can use wget or curl.

It is important to note that because the URL might contain an ampersand (&), you should put quotation marks around the URL.

DataGrab defaults to importing 1 entry at a time with the ?limit=1 parameter, which makes a new http request. Cron requests do not use http, so you may need to set your limit value to a value slightly more than the number of entries you expect to import.

new CLI commands.