Page 1 of 1
alternative method to cron job
Posted: Sat Mar 08, 2008 10:03 am
by samUK
hi, i have a script that pulls in a csv file and puts it in to a mysql database. I would like this process to be automated. So it pulls in the csv doc once every 20 mins.
Can anyone explain how i can do this usig php?
Re: alternative method to cron job
Posted: Sat Mar 08, 2008 11:00 am
by John Cartwright
Why can't you use cronjob? Taskscheduler is the equivalent on windoze.
Re: alternative method to cron job
Posted: Sat Mar 08, 2008 11:02 am
by samUK
sorry i dont know to much about cron job. I got the impression it can be slightly risky???
could you explain how cron job works?
Re: alternative method to cron job
Posted: Sat Mar 08, 2008 11:17 am
by John Cartwright
I wouldn't consider it risky by any means. Using makeshift cron emulators are probably more risky than using cron itself.
Cron will execute a command based on the interval you set and/or time.
Re: alternative method to cron job
Posted: Sat Mar 08, 2008 12:12 pm
by samUK
ok, could you explain how i would go about setting up a cron job?
can i run this locally on my pc?
Re: alternative method to cron job
Posted: Sat Mar 08, 2008 1:28 pm
by yacahuma
like jcart said
if you are in windows, use task scheduler
http://www.iopus.com/guides/winscheduler.htm
if you are in linux, use a cron job