Archive

Category Archives for "Cron"
35

Setting Up Cron Jobs

(Note: You can get this setup as part of your free installation. But if you would like to do it yourself, keep reading…

There is just one cron job (back-end, scheduled jobs) that you need to setup.

dap-cron.php (mandatory – once an hour)

This is the main one. It sends out broadcast emails, autoresponder emails, handles bulk member imports, affiliate commissions processing, clean up, etc. This one is mandatory.

Please Note: If you use 1ShoppingCart as your shopping cart, you need to setup another cron:
dap-emailorder.php (only if you use 1shoppingcart – every 10 minutes)

This is the email order processing cron, used ONLY for 1ShoppingCart. Skip setting this cron up if you’re not using 1ShoppingCart or 1SiteAutomation.com.

Path to DAP

Visit the url below in a browser window (replace YourSite.com with your actual domain name):

http://YourSite.com/dap/getpath.php

This will show something like this in your browser:

/home/path/to/dap 

This is your “Path to DAP” to your root folder.

To the end, add “/dap-cron.php”. So that makes your new “Path to DAP” to be:

/home/path/to/dap/dap-cron.php

This is your new “Path to DAP”. Make a note of this on a piece of paper, or in a notepad/text editor window.

Setting up the Cron jobs

A) dap-cron.php

This one is mandatory. Should be set up to run Once Every Hour. This hourly process is what sends out all the scheduled broadcast (bulk) emails and processes different types of “bulk actions” – like importing a large list of customers into DAP from an external system, for instance.

  1. Log in to your web host’s control panel (or cpanel)
  2. Look for the icon “Cron Jobs” in the “Advanced” section – usually towards the bottom of that page, and click on it.
  3. On the next window, in the “Common Settings” drop down, select “Once an hour (0 * * * *)“.
    And in the “Command” field, enter this:/usr/bin/php<insert space>/home/path/to/yoursite.com/dap/dap-cron.php

    NOTE: <insert space> above is just a note to you that means you must hit the spacebar and insert an actual space between the two pieces of text.
  4. Click on “Add New Cron Job”.

That’s it for this one.

B) dap-emailorder.php

Follow this step ONLY if you’re using 1ShoppingCart or any private label of 1SC – like 1SiteAutomation.com.

This cron job should be set up to run once every 10 minutes. This is the script that processes all of your recurring orders initiated by 1ShoppingCart or private label. So, if you set this up to run once every 10 minutes, then every 10 minutes, it will log in to your billing email address (you can configure what this email id is within the admin control panel on the “Config” screen) and process the email notifications that you have received from 1ShoppingCart (and its private labels).

Running it sooner than once every 10 minutes – like say, once every minute or even once every 5 minutes – is resource intensive, and is not a good idea. Your web host may not not even allow it in the first place. But even if they do, it’s not recommended.

Follow steps A(1) through A(4) above. Only difference is in what you’re going to be entering in the “Command” field.

For this cron job, it is…

/usr/bin/php<insert space>/home/path/to/yoursite.com/dap/dap-emailorder.php

Only difference between the two cron jobs is in the name of script that is being run. For the hourly cron (A), it was dap-cron.php. For the 10-minute cron (B), it is dap-emailorder.php.

MISCELLANEOUS NOTES:

1. Where you see the text <insert space>, replace with an actual space (hitting the space bar).

2. Cron Email Reports:

By default, your webhost will send you an hourly cron report. If you don’t want to receive hourly cron emails, you can turn it off in your hosting cpanel. You can login to your Webhost Control Panel > Cron Jobs page, and remove your email address from that page (where it says “Please enter an email address where the cron output will be sent”).

3. To check if you have set up the cron job correctly, you can set DAP Admin -> Setup -> Config -> Log Level to “Log All Activity (During Troubleshooting)” . Then go to DAP Admin -> System -> Logs . Empty the logs by clicking on the “Empty Logs” link, and then revisit the screen and refresh the page, after say 10 minutes (to verify the running of dap-emailorder.php) or at the top of the hour (to verify the running of dap-cron.php).

4. To force run a cron (manually), click on this link:

http://YourSite.com/dap/dap-cron.php
(to run hourly cron)

http://YourSite.com/dap/dap-emailorder.php
(to run the email order cron that runs every 10 minutes)

Replace YourSite.com with the actual domain name of your web site.

6

DAP Installation for Non-WordPress, Plain HTML Web Sites

NOTE: If you are using WordPress, then click here for instructions on how to install DAP as a WordPress Plugin.

This documentation below is only for installing DAP on a Non-WordPress, plain HTML web site.

But you don’t need to be doing this!

Did you know you get free installation along with your purchase of DAP? Yes, even if you are only trying out the free trial and haven’t paid us a dime! 🙂

But for some reason, if you do not wish to take us up on the free offer, and wish to do it yourself, then here are the instructions.

We’ve tried to make DAP installation extremely simple. To do a full installation of DAP (non-WordPress version), it will take about 15-20 minutes.

Uploading the files

Download dap.zip from the members area:

Unzip to your desktop. You should see a folder named dap

Upload the entire dap folder on your computer, to the root of your web site. The root directory is where your web site’s home page is usually located. This directory also goes by the name “public_html” or “www” or “htdocs”.

Once this is done, the dap folder should now be accessible by typing in http://www.Example.com/dap/ – but wait – don’t visit that link yet.

Creating the Database

You will first need to create a database for DAP to use and store its data. So log in to your web host control panel, go to the “MySQL Databases” section, create a new database, then create a new user (with password), then finally make sure you “Add” the newly created database user to the newly created database (to give the user access to create, read, update and delete data from the database).

Note down the new database name, username and password.

Installing DAP

Visit http://YourSite.com/dap/install/

Fill out the form there with the above database details.

Put in “localhost” for the database host name (unless your host has specifically asked you to use something else).

Submit the form.

That should create the dap-config.php file within your dap folder.

And you’ll see a series of messages about how the installation went.

That’s it for the basic DAP installation. You just need to set up the cron jobs to complete installation.

Updating .htaccess File

Add the following text to the .htaccess file in your root directory. [NOTE: If you don’t already have one, then simply copy the .htaccess file from /dap/client/website/ to your root directory]

#Paste this at the very end of your .htaccess file
#in your web site’s root folder

<IfModule mod_rewrite.c>
#dap
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !dapclient.php
RewriteCond %{REQUEST_URI} !^/dap/
RewriteCond %{REQUEST_FILENAME} !(.*)(\.php|\.css|\.js|\.jpg|\.gif|\.png|\.txt)$
RewriteRule (.*)   /dap/client/website/dapclient.php?dapref=/$1&plug=wp&%{QUERY_STRING}  [L] RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !dapclient.php
RewriteCond %{REQUEST_URI} !^/dap/
RewriteCond %{REQUEST_FILENAME} !(.*)(\.php|\.css|\.js|\.jpg|\.gif|\.png|\.txt)$
RewriteRule (.*)   /dap/client/website/dapclient.php?dapref=/$1&plug=wp&%{QUERY_STRING}  [L] </IfModule>

Setting Up the Cron Jobs

See this link to set up the cron jobs.

That’s it!

For support, open a ticket at http://www.DigitalAccessPass.com/support/