Using Crontab to edit HTML file?

wbaptist

New Member
Prime Account
Messages
24
Reaction score
1
Points
3
I am designing a website to put up on my x10hosted account. I was looking at having an events page, that would have a date then info about the event then a few lines down put in the second event and so on and so forth.

I want the crontab to run a script once a week or something like that, that will look at the html file find the dates and see if any of them are past the present date then to remove them leaving the other events intact. Would this be a very hard thing to do?
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
I wouldn't use crontab at all.

I'd use PHP/mySQL to get dates. :)

I'm sure someone else could help you. I'm a little too busy.

It would involve storing the events in the database, then getting the dates after a certain date (say 1 week ago) and outputting them into a table.
 

diabolo

Community Advocate
Community Support
Messages
1,682
Reaction score
32
Points
48
I am designing a website to put up on my x10hosted account. I was looking at having an events page, that would have a date then info about the event then a few lines down put in the second event and so on and so forth.

I want the crontab to run a script once a week or something like that, that will look at the html file find the dates and see if any of them are past the present date then to remove them leaving the other events intact. Would this be a very hard thing to do?

you would need an adequate amount of knowledge about PHP, and to have those dates stored in a DB, or you can use JS but i believe that is less efficient.

But setting up the cron is easy, just tell it to run weekly and point it to the PHP file you have created that you want to run
 
Top