View Full Version : help with cron

07-18-2008, 12:06 AM
i am not sure if this is php or not, i am so confused with these cron files.

i have been reading up on cron files and need to make one that will delete any cart information that is older than 2 days old. my cookie id is being saved as time()

this is what i have so far

i know my file needs to contain this
$twodays = strtotime("two days ago");
$query = "DELETE FROM `cart` WHERE `cart`.`cookie_id` <= $twodays";

and kind of have gathered i need a command similar to this

00 18 * * * /usr/local/bin/php $HOME/php/script.php

but i still dont even understand how to save this file or anything, if someone has a sample file that they use it would be greatly appreciated

also the only things that godaddy is asking for is:
cron job title
command ( which has a place for me to upload the file)

07-18-2008, 09:00 AM
This is a very clear short introduction article to CRON jobs with PHP:

Also an explanation with a few examples:

hope it helps a little

I haven't used godaddy so i can;t help with that part of your question.

07-18-2008, 10:12 AM
best bet is to contact them when dealing with their own system issues

they are best placed to support their own services

07-19-2008, 07:04 PM
thank you it was much easier than some of the tutorials i was using made it seem