Forum Moderators: phranque

Message Too Old, No Replies

Cron Scheduler

how to use cron ...

         

le_gber

9:35 am on May 28, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,

Just learn about this mighty cron scheduler and thought of using it ...

I've got several site which use stats systems which until now I updated manually (silly me ;) ).

What i've done is include the command to update them in the crontab file ( well more specifically a command to run a php script with includes in it for each of the site).

Now a question for you WW Webmasters. I want to purge the individual log files after every update:

  • is it possible to do it using php?
  • if yes what script would you use
  • if no how to do it using cron

    Thanks for your help.

    Leo

  • jatar_k

    11:22 pm on May 29, 2003 (gmt 0)

    WebmasterWorld Administrator 10+ Year Member



    if you delete the individual logs will they be recreated? If so you could always just unlink [php.net] them when you are done processing them or rename them if you still need the old ones.

    You could also rewind [php.net] the file pointer when you are done and just overwrite the contents with nothing.

    le_gber

    12:13 pm on May 30, 2003 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    Hi, jatar_k and thanks for the tips (Iknow nothing about PHP which expalins why I asked).

    I don't know if the log files will be recreated (will check with hosting company).

    Alos it doesn't seems to work yet (although I think I did everything properly - logged in a root, modified the crontab did crontab -l to see if it worked and restarted the cron deamon) - but still no luck.

    Anybody had experienced the same maybe?

    Leo