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.
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.