Page 1 of 1

Questions about Server

Posted: Mon Jan 20, 2014 4:38 am
by Nakia

With my Mega Bundle I got a licence to Server I want to have a play with.
Never having it used it before I have a simple (what I think is simple) starting point that I want to try out.

Basically have a Cron job setup to 4 times a day read in the CSV files that are in a folder, crunch these files and place the contents into a local My SQL DB then move the files into a processed directory. I would like to do this is a LC Stack if possible and not in PHP...

Does anyone have some starter points/tips or lessons I might find helpful to start with ?

Re: Questions about Server

Posted: Mon Jan 20, 2014 9:36 pm
by JGonz

you're talking of cron jobs, assume it's Linux?

A standalone called as cron job would do it, LC is awesome in string manipulating. And reading/ deleting/ saving new files wouldn't be much work. As well as connecting to a DB and running SQL queries.

Getting the right setup for your job might be a problem. I just asked a (nearly) similar question, hope we'll get good answers.

Have a good time!

Re: Questions about Server

Posted: Fri Jan 24, 2014 5:33 pm
by edgore
As the post above mentioned, you would not need to install server to do this - you can just create your application as a standalone and use cron to execute is on a schedule (or Windows Scheduler, or whatever for the platform you are running on).

Server is an add-in for Apache or other web servers that acts as a pre-processer, like PHP. You can put Livecode into your web pages and Livecode Server will execute the Livecode portions of the page and the results of the processing will be included with your webpage output.

Re: Questions about Server

Posted: Fri Oct 10, 2014 1:15 am
by sturgis
You can use a lc server script to do this.

The recent LC servers allow for proper use of shebang lines so you can create a script to do what you want, and have cron execute it. As long as you start the script with #!/path/to/livecode-server

Then your script (don't think you need to wrap it in <?lc ?> tags under these circumstances) set the script to executable and voila' .