phpnewbie112 Posted January 5, 2009 Share Posted January 5, 2009 Hello and Happy New Year 2009! could you pls advice if we can setup a cron from php. I have a small email script and I want to be able to schedule a given email let's say on 7/1/2009 15:00 Link to comment https://forums.phpfreaks.com/topic/139502-php-cron/ Share on other sites More sharing options...
gevans Posted January 5, 2009 Share Posted January 5, 2009 Have you checked if your server allows automated cron jobs? If so you could do it all easily from your server control panel!! Otherwise this is a little insight; # .---------------- minute (0 - 59) # | .------------- hour (0 - 23) # | | .---------- day of month (1 - 31) # | | | .------- month (1 - 12) OR jan,feb,mar,apr ... # | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat # | | | | | * * * * * command to be executed Link to comment https://forums.phpfreaks.com/topic/139502-php-cron/#findComment-729799 Share on other sites More sharing options...
phpnewbie112 Posted January 5, 2009 Author Share Posted January 5, 2009 yes it allows but I want the cron to be set from inside a php script not manually from cpanel Link to comment https://forums.phpfreaks.com/topic/139502-php-cron/#findComment-729802 Share on other sites More sharing options...
gevans Posted January 5, 2009 Share Posted January 5, 2009 I'm not 100% but I believe most shared servers (im guessing your on a shared server) will not allow you access to the file that sets the cron job, expecially if they give you the ability to set it. You'd be better off setting one to trigger monthly (if that's what you required) Link to comment https://forums.phpfreaks.com/topic/139502-php-cron/#findComment-729805 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.