+ Reply to Thread
Results 1 to 3 of 3

Thread: Using Crontab to edit HTML file?

  1. #1
    wbaptist is offline x10Hosting Member wbaptist is an unknown quantity at this point
    Join Date
    Jan 2009
    Posts
    21

    Using Crontab to edit HTML file?

    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?

  2. #2
    leafypiggy's Avatar
    leafypiggy is offline Community Advocate leafypiggy is on a distinguished road
    Join Date
    Aug 2007
    Location
    Massachusetts
    Posts
    2,228

    Re: Using Crontab to edit HTML file?

    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.
    Neil Hanlon | x10Hosting Support Representative
    Neil[at]x10hosting.com
    █ I'm always happy to help. Just ask a question in Free Hosting
    Terms of Service IRC

  3. #3
    diabolo's Avatar
    diabolo is offline Community Advocate diabolo is on a distinguished road
    Join Date
    Nov 2007
    Location
    Jersey Shore
    Posts
    1,683

    Re: Using Crontab to edit HTML file?

    Quote Originally Posted by wbaptist View Post
    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

+ Reply to Thread

Similar Threads

  1. Problem with file copy script
    By DaveBC in forum Programming Help
    Replies: 5
    Last Post: 01-12-2009, 02:14 PM
  2. Need to edit .htacces file for my wordpress blog
    By balaji2u in forum Scripts & 3rd Party Apps
    Replies: 3
    Last Post: 11-12-2008, 06:36 PM
  3. include html from another file?
    By galaxyAbstractor in forum Scripts & 3rd Party Apps
    Replies: 4
    Last Post: 11-17-2007, 01:24 PM
  4. [IPB] Contiguous Board Index
    By phenetic in forum Tutorials
    Replies: 5
    Last Post: 09-18-2005, 10:31 AM
  5. What is XML!
    By wizeman in forum Tutorials
    Replies: 6
    Last Post: 08-27-2005, 12:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers