mybowlby Posted June 14, 2008 Share Posted June 14, 2008 i have very little experience with php and im trying to setup my cronjobs for the script i purchased. Can someone tell me where i would put the time it would reset? i know my database settings going in the x's but where do i put the time to reset? the installation directions are not very clear. Thanks everyone! <?php $host="localhost"; $username="XXXXXX"; $password="XXXXXX"; $db_name="XXXXXX"; $connect = mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $sql = "DELETE FROM `xtrm_train`"; mysql_query($sql,$connect); ?> i also have the same question about this page with this code <?php $host="localhost"; $username="XXXXXX"; $password="XXXXXX"; $db_name="XXXXXX"; $connect = mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $sql = "UPDATE xtrm_vip SET vip_days=vip_days-1 WHERE vip_days > 0"; mysql_query($sql,$connect); ?> Link to comment https://forums.phpfreaks.com/topic/110163-simple-php-cronjob-question/ Share on other sites More sharing options...
mybowlby Posted June 14, 2008 Author Share Posted June 14, 2008 thanks for the help everyone :[ Link to comment https://forums.phpfreaks.com/topic/110163-simple-php-cronjob-question/#findComment-565355 Share on other sites More sharing options...
DarkWater Posted June 14, 2008 Share Posted June 14, 2008 Cron has nothing to do with PHP. You can use cron to run PHP scripts, but cron doesn't necessarily have to do with PHP. Do you have a Linux box with cron on it? =/ Link to comment https://forums.phpfreaks.com/topic/110163-simple-php-cronjob-question/#findComment-565356 Share on other sites More sharing options...
mybowlby Posted June 14, 2008 Author Share Posted June 14, 2008 yes i do. the installers direction were to update the time in those two files to what time of day you want it to reset at. Link to comment https://forums.phpfreaks.com/topic/110163-simple-php-cronjob-question/#findComment-565363 Share on other sites More sharing options...
DarkWater Posted June 14, 2008 Share Posted June 14, 2008 No no no. Cron is not something put into a PHP script. Do you have a Cpanel? Link to comment https://forums.phpfreaks.com/topic/110163-simple-php-cronjob-question/#findComment-565395 Share on other sites More sharing options...
winmastergames Posted June 14, 2008 Share Posted June 14, 2008 If you are using Windows you can just setup a scheduled task to do the same thing kind of Link to comment https://forums.phpfreaks.com/topic/110163-simple-php-cronjob-question/#findComment-565403 Share on other sites More sharing options...
mybowlby Posted June 14, 2008 Author Share Posted June 14, 2008 No no no. Cron is not something put into a PHP script. Do you have a Cpanel? Yeah, im using cpanel 10. Link to comment https://forums.phpfreaks.com/topic/110163-simple-php-cronjob-question/#findComment-565493 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.