Ads Posted January 7, 2008 Share Posted January 7, 2008 How do I use Cron Jobs to Do some PHP Function, EG Reset Databse Feilds, and back up Data bse and send emails, Things like that. Quote Link to comment https://forums.phpfreaks.com/topic/84819-solved-php-with-cron-jobs/ Share on other sites More sharing options...
cooldude832 Posted January 7, 2008 Share Posted January 7, 2008 you write the script you tell your cron to do it however your system lts you Quote Link to comment https://forums.phpfreaks.com/topic/84819-solved-php-with-cron-jobs/#findComment-432403 Share on other sites More sharing options...
Ads Posted January 7, 2008 Author Share Posted January 7, 2008 Why use a Cron, Couldn't i just use PHP to Read the Time, and use an If statement? Quote Link to comment https://forums.phpfreaks.com/topic/84819-solved-php-with-cron-jobs/#findComment-432404 Share on other sites More sharing options...
cooldude832 Posted January 7, 2008 Share Posted January 7, 2008 because php can't initialize itself cron is like you go to mydomain.com/RunScript.php in firefox Quote Link to comment https://forums.phpfreaks.com/topic/84819-solved-php-with-cron-jobs/#findComment-432410 Share on other sites More sharing options...
Ads Posted January 7, 2008 Author Share Posted January 7, 2008 okay, and what can i write Cron jobs in? Quote Link to comment https://forums.phpfreaks.com/topic/84819-solved-php-with-cron-jobs/#findComment-432411 Share on other sites More sharing options...
cooldude832 Posted January 7, 2008 Share Posted January 7, 2008 nothing you tell the crontab a date and a time to execute a given file that is all Quote Link to comment https://forums.phpfreaks.com/topic/84819-solved-php-with-cron-jobs/#findComment-432413 Share on other sites More sharing options...
Ads Posted January 7, 2008 Author Share Posted January 7, 2008 Alright, how do u make a crontab? Quote Link to comment https://forums.phpfreaks.com/topic/84819-solved-php-with-cron-jobs/#findComment-432416 Share on other sites More sharing options...
Ken2k7 Posted January 7, 2008 Share Posted January 7, 2008 What do you wanna do? Assign a time Time: * * * * * => Execute every minute 0 * * * * => Execute every Hour 0 0 * * * => Execute every mid-night 0 0 0 * * => Execute every Month 0 0 0 0 * => Execute every Weekday Assign path to php Assign a UNIX command for a job Assign the PHP pathfile That's it. In that order (I think) Quote Link to comment https://forums.phpfreaks.com/topic/84819-solved-php-with-cron-jobs/#findComment-432420 Share on other sites More sharing options...
priti Posted January 7, 2008 Share Posted January 7, 2008 1.crontab -e 2. 30 23 * * * /home/path to your this script/yourscript.php (run this program each night as 11.30 PM ) 3. save and exit Regards Quote Link to comment https://forums.phpfreaks.com/topic/84819-solved-php-with-cron-jobs/#findComment-432422 Share on other sites More sharing options...
Ads Posted January 7, 2008 Author Share Posted January 7, 2008 at a Certen time, I want a php page to excute, but i don;t want it to like Pop up on the screen. I want it in the background. Quote Link to comment https://forums.phpfreaks.com/topic/84819-solved-php-with-cron-jobs/#findComment-432432 Share on other sites More sharing options...
Ken2k7 Posted January 7, 2008 Share Posted January 7, 2008 at a Certen time, I want a php page to excute, but i don;t want it to like Pop up on the screen. I want it in the background. Well it executes a file so unless you tell the file to popup a box to the screen, it won't just automatically pop it up. Quote Link to comment https://forums.phpfreaks.com/topic/84819-solved-php-with-cron-jobs/#findComment-432434 Share on other sites More sharing options...
priti Posted January 7, 2008 Share Posted January 7, 2008 at a Certen time, I want a php page to excute, but i don;t want it to like Pop up on the screen. I want it in the background. dear ads, cron is driven by a crontab, a configuration file that specifies shell commands to run periodically on a given schedule. Generally, the schedules modified by crontab are enacted by a daemon, crond, which runs constantly in the background and checks once a minute to see if any of the scheduled jobs need to be executed. If so, it executes them. These jobs are generally referred to as cron jobs. CRON ARE BACKGROUND PROCESSES WHICH RUN SLIENTLY AND EXECUTE YOUR SCRIPT WITHOUT ANY POP UPS or so. I think your need to read some tutorial about cron and it will help you more to understand them. Quote Link to comment https://forums.phpfreaks.com/topic/84819-solved-php-with-cron-jobs/#findComment-432437 Share on other sites More sharing options...
Ads Posted January 7, 2008 Author Share Posted January 7, 2008 at a Certen time, I want a php page to excute, but i don;t want it to like Pop up on the screen. I want it in the background. dear ads, cron is driven by a crontab, a configuration file that specifies shell commands to run periodically on a given schedule. Generally, the schedules modified by crontab are enacted by a daemon, crond, which runs constantly in the background and checks once a minute to see if any of the scheduled jobs need to be executed. If so, it executes them. These jobs are generally referred to as cron jobs. CRON ARE BACKGROUND PROCESSES WHICH RUN SLIENTLY AND EXECUTE YOUR SCRIPT WITHOUT ANY POP UPS or so. I think your need to read some tutorial about cron and it will help you more to understand them. Cool that was pretty much all i wanted to know, So thank You Quote Link to comment https://forums.phpfreaks.com/topic/84819-solved-php-with-cron-jobs/#findComment-432444 Share on other sites More sharing options...
priti Posted January 7, 2008 Share Posted January 7, 2008 you most welcome . Quote Link to comment https://forums.phpfreaks.com/topic/84819-solved-php-with-cron-jobs/#findComment-432453 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.