Does the sript run when you access it via the web? ie going to mysite.com/script.php
If it does then you can let the server open it using wget.
Something like..
00 2 * * * wget http://wwwdomain.com/script.php
I have put together a small php script that will log onto cj and retrieve a sales report and then read it into mysql.
What I would like to do with it is run it as a cron job but I ame not sure how to do it.
Can I run the script directly or do I need to call it from another script?
any help appreciated.
Thanks,
Roger.
Does the sript run when you access it via the web? ie going to mysite.com/script.php
If it does then you can let the server open it using wget.
Something like..
00 2 * * * wget http://wwwdomain.com/script.php
If you have problems running anything by cron, here is something helpful dug out from my huge favourites list:
http://www.fastcron.com/
Basically it is a cheap cron-type service that runs remotely. You tell it what scripts to run and when and it hits them. Used to use this a lot in the days before having my own servers and found it very useful.
Thanks Aquanuke. I figured there must have been an easy way to do it. Been a lot of years since I messed around with linux and my memory was failing me.
Works a treat.
Roger.
Roger - I run php scripts form the command line with something like:
/usr/bin/php -q /path/to/script.php
... so that would be cron-able.
Not sure what the -q switch does, but it was in instructions that came with something so I use it (might be for "quiet" mode - suppress output, that's a guess).
Are You Crazy?
Roger,
I've just checked your posts 'webpage link' and have an issue with a number of copyright infringements on your site.
Sorry to do this publically but I'm sick and tired of sites showing a blatant disregard for copyright.
Please go over your privacy policy, FAQ and Terms & Conditions pages and change all the content that you have copied from GreasyPalm.
I expect all copyright infringements to be resolved within 24 hours before escalating proceedings.
Neil Durrant
neil@greasypalm.co.uk
neil,
regardless of the level of copyright infrigement roger may or may not be guilty of (i have no idea and i'm certainly not going to bother checking) your decision to post your complaint on the board and not via email is quite pathetic imho.
by all means send him a private message, but to go public first is not the way to handle it - unless he is a persistent offender, which he doesn't appear to be by your message.
still, it makes the decision not to bother with your programme so much easier.
Neil, sorry for the mixup. I have sent you an email so I won't go into the whats and where fors here.
Don't be to harsh, personally I think that Neil has a great programme.Originally posted by jrisby
still, it makes the decision not to bother with your programme so much easier.
Roger.
Firstly, Roger, thank you for your personal email. I appreciate your prompt and courteous resolution of these issues.
JRisby, I'm sorry you felt the post was inapproriate but I don't make any apologies for doing so - it's no more inappropriate than people lacking respect of copyright. I chose to make it clear that such will not be tolerated to ultimately protect the interests of both my company and my affiliate partners.
neil,
you handle your copyright issues as you see fit, obviously.
as a member of the nuj, and a programmer, i value the copyright in my work and i understand where you are coming from. i just totally disagree with starting a dialogue about infringement in a public forum. but, when you do so, don't be surprised that people other than those directly involved respond and consider your business decisions ill-judged.
john
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks