Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8489095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:43:50+00:00 2026-06-10T21:43:50+00:00

I need to write a php script which runs every hour, so, in my

  • 0

I need to write a php script which runs every hour,

so, in my database i have 7 tables which represents the days of week like sunday, monday, tuesday etc, and all the tables have 25 columns which represents 24hours like 1am, 2am, 3am etc and a timestamp column.

so, now i have to write a php script which uses cron to run this script every hour.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T21:43:52+00:00Added an answer on June 10, 2026 at 9:43 pm

    Use the php date() function to get current date information in various format without needing to use DB.

    Here is the link to the PHP manual.

    http://php.net/manual/en/function.date.php

    Some examples straight from linked PHP manual page.

    <?php
    // set the default timezone to use. Available since PHP 5.1
    date_default_timezone_set('UTC');
    
    
    // Prints something like: Monday
    echo date("l");
    
    // Prints something like: Monday 8th of August 2005 03:12:46 PM
    echo date('l jS \of F Y h:i:s A');
    
    // Prints: July 1, 2000 is on a Saturday
    echo "July 1, 2000 is on a " . date("l", mktime(0, 0, 0, 7, 1, 2000));
    
    /* use the constants in the format parameter */
    // prints something like: Mon, 15 Aug 2005 15:12:46 UTC
    echo date(DATE_RFC822);
    
    // prints something like: 2000-07-01T00:00:00+00:00
    echo date(DATE_ATOM, mktime(0, 0, 0, 7, 1, 2000));
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to write a php script which is called by a setInterval( ajaxrequest('ftp.php',
I have a simple php script on my web server which I need to
I need to write php code to identify common e-mail errors, like inbox full
i have got <div><a class='link' href='index.php' data-container='target'>Load</a></div> <div class='target'></div> i need to write jquery
I need to write a script in Matlab, which will read some data from
I have script which allows the user to choose an image and write something
I have written a PHP script which allows me to modify and update a
I am trying to write a php script which will insert an object into
I have a blog I wrote in PHP, and need to shorten the latest
I have one PHP script that has to start a second script in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.