CRON-jobs

Discuss all aspects of programming here.

Moderator: The Mod Squad

CRON-jobs

Postby Toby B. » Wed Nov 03, 2004 11:08 pm

What are CRON-jobs? Are they very useful for growing sites? Where do I find out if my site/server accepts the use of CRON-jobs?

My site is aimed at Compaq/HP motherboard/system info and with some sheer confusion showing its ugly face more and more I have opted to integrate links on the individual pages to a forum section (much like your Articles/reviews). I would like to automate this if possible, but do not know where to start.... As it stands right now I have 73 board (HTML) pages linked to my forum and this has not even scratched the surface....

Any ideas?

Thanks
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14277
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine

Postby Toby B. » Thu Nov 04, 2004 3:44 am

Well it seems the hosting package I have does allow cron-jobs. Now I just have to figure out more about them....
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14277
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine

Postby MoboCop » Thu Nov 04, 2004 4:02 am

cronjobs allow you to run a program or a script at specific times.

I use cronjobs currently to grab the folding stats from standford every three hours and update the database.

Cronjobs are used also by the webservers to rotate logs and other housekeeping functions.

If you have something you think you want to setup on cron I can explain what needs to be done to get your program or scripts setup in the crontab.
Not everything that can be counted counts, and not everything that counts can be counted - Albert Einstien
MoboCop
Drunken Master
 
Posts: 8854
Joined: Tue Jan 18, 2000 1:01 am
Location: Fresno

Postby Toby B. » Thu Nov 04, 2004 4:11 am

If you have something you think you want to setup on cron I can explain what needs to be done to get your program or scripts setup in the crontab.


Are you using a cron-job with the articles/reviews to add a post to the forum or is that something entirely different???

I am looking to automate (if possible) this process - New/updated page(s) when uploaded has a corresponding post/tread created in my forum... Like I said, I am at 73 posts right now and have not even scratched the surface...

Did I confuse you yet? 8O
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14277
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine

Postby MoboCop » Thu Nov 04, 2004 10:29 am

Toby B. wrote:
If you have something you think you want to setup on cron I can explain what needs to be done to get your program or scripts setup in the crontab.


Are you using a cron-job with the articles/reviews to add a post to the forum or is that something entirely different???

I am looking to automate (if possible) this process - New/updated page(s) when uploaded has a corresponding post/tread created in my forum... Like I said, I am at 73 posts right now and have not even scratched the surface...

Did I confuse you yet? 8O


no I dont use it to update forums.

To accomplish this first you will need a script that when run will update your forums properly.

Once this script is working it is easy to setup a cron job to run the script at certain intervals.

On the other hand if you upload the pages manually you could always run the script from a browser after you upload.
Not everything that can be counted counts, and not everything that counts can be counted - Albert Einstien
MoboCop
Drunken Master
 
Posts: 8854
Joined: Tue Jan 18, 2000 1:01 am
Location: Fresno

Postby Toby B. » Thu Nov 04, 2004 2:27 pm

Any tips, etc. for setting up such a script? And as far as manually running the script, that would be no problem really.

no I dont use it to update forums.
At least I was able to explain it well enough so you know what I was wanting to do... :wink:

Thanks
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14277
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine

Postby MoboCop » Thu Nov 04, 2004 8:08 pm

if you are using phpbb the easiest way is to use the custom function insert post which is a third party function you can find searching the phpbb forums.

It comes with some basic instructions which should help you get started (if you know php you should be ok).
Not everything that can be counted counts, and not everything that counts can be counted - Albert Einstien
MoboCop
Drunken Master
 
Posts: 8854
Joined: Tue Jan 18, 2000 1:01 am
Location: Fresno

Postby Toby B. » Thu Nov 04, 2004 9:11 pm

ok great.. Thanks!

I am still a php newbie, but I can usually get it figured out with some trial and error... :wink:
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14277
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine

Postby Toby B. » Fri Nov 05, 2004 11:16 pm

MoboCop wrote:if you are using phpbb the easiest way is to use the custom function insert post which is a third party function you can find searching the phpbb forums.

It comes with some basic instructions which should help you get started (if you know php you should be ok).


I found a MOD "InsertPost", but cannot figure it out for the life of me... :oops:
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14277
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine

Postby MoboCop » Sat Nov 06, 2004 1:28 pm

Toby B. wrote:
MoboCop wrote:if you are using phpbb the easiest way is to use the custom function insert post which is a third party function you can find searching the phpbb forums.

It comes with some basic instructions which should help you get started (if you know php you should be ok).


I found a MOD "InsertPost", but cannot figure it out for the life of me... :oops:


Once you have it installed you need to write a script that calls the function

insert_post()

You will need to fill the variables with your data.

You also might want to read through the post on phpbb about it it is huge and lots of questions asked in there.

Also there is a link to the guys website and he has some forums there as well.
Not everything that can be counted counts, and not everything that counts can be counted - Albert Einstien
MoboCop
Drunken Master
 
Posts: 8854
Joined: Tue Jan 18, 2000 1:01 am
Location: Fresno

Next

Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest