executing newLISP scripts when there is no cron

Q&A's, tips, howto's
Locked
joejoe
Posts: 173
Joined: Thu Jun 25, 2009 5:09 pm
Location: Denver, USA

executing newLISP scripts when there is no cron

Post by joejoe »

Hi -

At the moment, nearlyfreespeech.net doesnt have cron available.

Is it possible to call a .lsp file from another server that allows cron? (without leaving the .lsp file world readable?)

Or would it be a drag on the server to set up a persistent nL script that calls another nL script every half hour or so?

Has anyone w/ nearlyfreespeech.net figured a way to do scheduled jobs with newLISP?

thanks very much for any insight or direction!

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Re: executing newLISP scripts when there is no cron

Post by cormullion »

Interesting question, but I don't know any answers... I don't think you can run anything persistent on nearlyfreespeech.net - if noone's looking at your site, it isn't there...

I suppose it also depends on what sort of job you want the script to run? Don't know if you can get something to run if you make a particular request on a cgi page...

itistoday
Posts: 429
Joined: Sun Dec 02, 2007 5:10 pm
Contact:

Re: executing newLISP scripts when there is no cron

Post by itistoday »

Yes, simply make it world readable but pass in a secret token.

I.e. say your server is using Dragonfly and you've got a page like this:

http://www.my-cronless-server.com/cron?secret=blah

Then just load that URL periodically from some location. The blah page will check (if (= "blah" ($GET "secret")) (do-stuff)).

For added security use POST instead of GET and combine with HTTPS.
Get your Objective newLISP groove on.

joejoe
Posts: 173
Joined: Thu Jun 25, 2009 5:09 pm
Location: Denver, USA

Re: executing newLISP scripts when there is no cron

Post by joejoe »

Excellent! I will try this with Dragonfly and report back my success. Thanks to both of you for the direction.

joejoe
Posts: 173
Joined: Thu Jun 25, 2009 5:09 pm
Location: Denver, USA

Re: executing newLISP scripts when there is no cron

Post by joejoe »

It seems that dragonfly can only run in the /home/public folder on nearlyfreespeech.net and i have another script running in the /home/public folder so i cannot see how i would be able to use dragonfly on this same account to execute a nL script.

I will try to figure out another way. At the moment I am thinking to write a php file that can be executed from a cron job on a server with cron. I would like to use newLISP for this, but my skill is still very low.

If I figure out something with nL, I will post back here. If anyone has an idea, I'd be happy to try and implement it. :D

rand
Posts: 1
Joined: Mon Dec 21, 2009 1:53 am
Location: Indianapolis, IN USA

Re: executing newLISP scripts when there is no cron

Post by rand »


itistoday
Posts: 429
Joined: Sun Dec 02, 2007 5:10 pm
Contact:

Re: executing newLISP scripts when there is no cron

Post by itistoday »

rand wrote:you can try http://cronless.com/
What a useful site!
Get your Objective newLISP groove on.

joejoe
Posts: 173
Joined: Thu Jun 25, 2009 5:09 pm
Location: Denver, USA

Re: executing newLISP scripts when there is no cron

Post by joejoe »

Another thought on using nL when there is no cron:

If I can run my script on another server that has cron and nL, can I use nL to transfer the file via ftp to the remote server?

Im thinking of trying to use one of the Socket TCP/IP and UDP network API functions.

If that cant be done, am I correct to assume I can execute an ftp command via nL to put the file on a remote server?

thanks very much!

itistoday
Posts: 429
Joined: Sun Dec 02, 2007 5:10 pm
Contact:

Re: executing newLISP scripts when there is no cron

Post by itistoday »

Here's another site for the same thing:

http://www.runmelater.com/
Get your Objective newLISP groove on.

Locked