Does anyone know how to make a linux time stamp?
Moderator: General Moderators
- genetix
- Forum Contributor
- Posts: 115
- Joined: Fri Aug 01, 2003 7:40 pm
- Location: Sask, Regina
- Contact:
Does anyone know how to make a linux time stamp?
I currently own an site and I need to insert data into a mysql database every once and a while. The problem is I dont know how to write a time stamp. I'm going to be using control pannel 8 I think it is so I need to know what to put into the boxes.
Can anyone help me out?
Can anyone help me out?
Code: Select all
<?php
echo time();
?>keep in mind that mysql timestamps aren't unix timestamps. If you are going to insert that timestamp into timestamp field it should be formatted as
Code: Select all
echo date("YmdHis");have you ever done shell scripting?
webpages are markup languages. the scripting langs used are often just tools for displaying dynamic markup in regaurds to the web. if you haven't done shell scripting i STRONGLY suggest getting a tutorial on that beforeyou write a control panel/interface for linux.
webpages are markup languages. the scripting langs used are often just tools for displaying dynamic markup in regaurds to the web. if you haven't done shell scripting i STRONGLY suggest getting a tutorial on that beforeyou write a control panel/interface for linux.
- Pyrite
- Forum Regular
- Posts: 769
- Joined: Tue Sep 23, 2003 11:07 pm
- Location: The Republic of Texas
- Contact:
I have/use cpanel 8, and I really don't know what you're talking about. But it might be in the cpanel docs?
http://www.cpanel.net/docs.htm
http://www.cpanel.net/docs.htm
- genetix
- Forum Contributor
- Posts: 115
- Joined: Fri Aug 01, 2003 7:40 pm
- Location: Sask, Regina
- Contact:
I dont want to write a control pannel.
If you go into the cron job section of control pannel 8 you can type in the date you want a script to run and then you write in the script or command you want it to run when the time is reached.
Heres the demo:
http://cpaneldemo.cpanel.net:2082/front ... ecron.html?
I just need to know what to put in the command field. Can I put normal php?
If you go into the cron job section of control pannel 8 you can type in the date you want a script to run and then you write in the script or command you want it to run when the time is reached.
Heres the demo:
http://cpaneldemo.cpanel.net:2082/front ... ecron.html?
I just need to know what to put in the command field. Can I put normal php?
- genetix
- Forum Contributor
- Posts: 115
- Joined: Fri Aug 01, 2003 7:40 pm
- Location: Sask, Regina
- Contact:
my question is the same its just people keep interpretting it wrong. I will make the full question in this post:
When I log into my control pannel for my website(CPannel
and I got to cronjobs then hit standard it shows options that must be filled in. The first option is an email address to email the results to. The third one is selection boxes where you select the time when the script should run. The last one is the one I'm having trouble with. Its a box with the title Command: I am wondering it I can put php in the command box. I'm trying to insert mysql rows into a database through a cron job. a demo of control pannel 8 is available at http://www.cpanel.net/.
To jump right to the cron job demo go here:
http://cpaneldemo.cpanel.net:2082/front ... ecron.html? username cpdemo
password cpdemo
When I log into my control pannel for my website(CPannel
To jump right to the cron job demo go here:
http://cpaneldemo.cpanel.net:2082/front ... ecron.html? username cpdemo
password cpdemo