Results 1 to 13 of 13

Thread: I am looking for a code that do an event at spesified time at day!

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    20

    I am looking for a code that do an event at spesified time at day!

    Hi All
    The matter is that I have a counter at my site, stores the values at a text file, and I want to reset this counter automatically to zero every day at a specified time, lets say at 6 pm, so any body have ideas how to do that?

    Regards

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: I am looking for a code that do an event at spesified time at day!

    cron on 'nix, Scheduled Task on Win.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    20

    Re: I am looking for a code that do an event at spesified time at day!

    what?

    I couden't understood that
    Is there a full code or an article speaking about this please?

  4. #4
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: I am looking for a code that do an event at spesified time at day!

    Are you using Windows or Linux?

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    20

    Re: I am looking for a code that do an event at spesified time at day!

    It is a Linux server.
    but... hmmm
    Do I need to contact the server administrator to do this for me?!!
    Last edited by The SNiper; Feb 25th, 2007 at 05:01 AM.

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    20

    Re: I am looking for a code that do an event at spesified time at day!

    ok, I was thinking how do they program the script that show you how many vistors where at your website every day, is this may help me at what I want?

  7. #7
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: I am looking for a code that do an event at spesified time at day!

    To execute a program at a specified time either regularly or once off on Linux, use a cron job. You can usually configure these using CPanel or DirectAdmin or whatever administrative interface your host provides for you.

    Visitor counting doesn't require a cron job, just a database.

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    20

    Re: I am looking for a code that do an event at spesified time at day!

    No, what I meant is the script which counts the vistors of a site every day, and it reset at the end of the day to start again at the next day from zero, you think we can use it here in some way?

  9. #9
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: I am looking for a code that do an event at spesified time at day!

    It doesn't "reset". The total for each day is incremented every time someone visits during that day, and queried each time you run the script. When the clock ticks over to the next day, the script simply saves to a different database record.

  10. #10

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    20

    Re: I am looking for a code that do an event at spesified time at day!

    hmmm, this is nice, it may be helpful...
    Can you help and give me such script? I mean if you've faced it at some place, but to be simple so I can understand how it works and try to use it in some how.
    And all thanks for begin patient with me all this time, and even you don't like me, I like you

  11. #11
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: I am looking for a code that do an event at spesified time at day!

    You may not like me any more when I say: no.

    There are plenty of tutorials on the net that cover using databases with PHP. You probably have MySQL installed. Figure out how to use that and actual script logic should be simple.

  12. #12

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    20

    Re: I am looking for a code that do an event at spesified time at day!

    Ok you won, I don't like you

    I'll continue searching, and I'll see if my control panel give me the ability to schedule using this cron

    Thank you very much, you where helpful really (F)

  13. #13
    Hyperactive Member
    Join Date
    Oct 2006
    Posts
    354

    Re: I am looking for a code that do an event at spesified time at day!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width