Jump to content

Using cronjobs.


3raser

Recommended Posts

How would one do this? I searched on google, but it couldn't find a good tutorial. My host allows the option in the control panel for it to set it up for you, but I want to learn the actual coding part just in case I never have the option available.

 

How would I run, say, this script every 4 hours for example?

 

<?php

mysql_query("TRUNCATE logs");

?>

Link to comment
Share on other sites

It's says linux, because this cronjob stuff is meant for linux servers. I am pretty sure your server is running on it to.

depending on your admin panel you need to make a file with the stuff in it shown in the article. (that is not a .php filebut it does link to a php which needs to be processed)

Doesn't your host provide a working example on some help forum, some host have there won little tweeks.

 

Ill try to find a more descriptive tutorial, but really google seems to be pretty good at this.

Maybe a good thing to say what the name is of the admin panel.

 

-EDIT:  this is a very descriptive explanation of what cron is: http://www.unixgeeks.org/security/newbie/unix/cron-1.html

 

-EDIT2: http://www.thesitewizard.com/general/set-cron-job.shtml  <----------- i can't explain it better than this.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.