Giter VIP home page Giter VIP logo

childrens-society-en-export's Introduction

Children's Society Engaging Networks data export

Script to download data exports from Engaging Networks and upload to an SFTP server, which can be run manually on-demand or set up to run regularly e.g. daily.

It is set up for PHP 5.3.3.

Installation and setup

1. Log into your server using SSH.

2. Clone this repository onto your server:

git clone [email protected]:glynmthomas/childrens-society-en-export.git

or

git clone https://github.com/glynmthomas/childrens-society-en-export.git

3. Install the packages it relies on using composer, in the same directory where you cloned it:

composer install

(If you don't have composer, you can get it here)

4. Create a .env file which will hold your environment variables (some of which are sensitive):

cp .env.example .env

5. Check and add variables into the .env file:

vi .env

Any value which has spaces needs "double quotes" around it Save the file and exit (:x if you're using Vi as your text editor)

6. Test it's working by going into the src directory and running the script:

cd src

php script.php

Having PHP problems? Check your version with php -v - it's set up for 5.3.3. Having any other problems? More detailed errors are saved in the log file error-log.txt in the main directory.

7. Set up a scheduled cron job:

crontab -e or sudo crontab -e

then in the text editor that comes up, add something like this:

0 2 * * * cd /root/engaging-networks-export/ && php src/script.php

This example runs daily at 2am, see more examples. Change the directory location after cd to wherever you cloned the repository.

childrens-society-en-export's People

Contributors

joefhall avatar glynmthomas avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.