Jump to content

Auto-executing php scripts


flagman5

Recommended Posts

Hi All

Sorry if this is a commonly addressed question

but is there way to create php script/function that will automatically edit a TXT file in the same directory at a specified time?

my use for this is that I have a webpage where it shows a bunch of threads (kind of like a bbs) and then I want to be able to insert a big horizontal break after each day, so it nicely separates each days postings

is it possible to coordinate with the server clock and at the beginning of everyday at 00:00:01 it will automatically edit that webpage and pop in the daybreak line

thanks!
Link to comment
Share on other sites

Unless you leave your browser open 24/7 refreshing every second, theres no way to make it on a php level schedule things to happen.

So yeah you got to use cron jobs or at as said above.

php works as its called, it doesnt run 24/7. So unless its being run at the time being needed it doesnt know to run
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.