alternative method to cron job

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
samUK
Forum Newbie
Posts: 18
Joined: Fri Mar 07, 2008 12:31 pm

alternative method to cron job

Post 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?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: alternative method to cron job

Post by John Cartwright »

Why can't you use cronjob? Taskscheduler is the equivalent on windoze.
samUK
Forum Newbie
Posts: 18
Joined: Fri Mar 07, 2008 12:31 pm

Re: alternative method to cron job

Post 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?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: alternative method to cron job

Post 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.
samUK
Forum Newbie
Posts: 18
Joined: Fri Mar 07, 2008 12:31 pm

Re: alternative method to cron job

Post by samUK »

ok, could you explain how i would go about setting up a cron job?

can i run this locally on my pc?
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

Re: alternative method to cron job

Post 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
Post Reply