![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Re : Pass parameters from Cron job to Java code | samshaw | High Level Programming | 1 | 12-05-2008 07:01 AM |
| problem mailing HTML code in cron file. | abhishek.mind | UNIX for Advanced & Expert Users | 1 | 09-25-2008 06:59 AM |
| Terminal And Cron Job Return Different Status Code | isaac_ho | Shell Programming and Scripting | 1 | 06-02-2008 01:12 AM |
| how to convert from korn shell to normal shell with this code? | forevercalz | Shell Programming and Scripting | 21 | 11-23-2005 02:18 AM |
| End of Error correction | kristian | UNIX for Dummies Questions & Answers | 1 | 01-07-2002 11:42 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
cron job - shell code correction
Hi I have a website that is having problem with cron jobs...
I have a cron job set up to go to a page with this code... <? include('config.php'); if($_sys->bible_email_frequency == 'DAILY') { $u = new user(); $u->send_bible_email(); } ?> If i send my browser to this page then the action occurs okay but if I set a cron job to go there I get no action at all. Some one said that this code is not shell compliant and it needs to be. Can anyone correct it for me? Thanks |
|
||||
|
A user cannot use the crontab command if one of the following is true:
* The cron.allow file and the cron.deny file do not exist (allows root user only). * The cron.allow file exists but the user's login name is not listed in it. * The cron.deny file exists and the user's login name is listed in it. check man crontab. |
|
||||
|
I've never heard of using cron to visit web pages. Maybe it will work, but I would do whatever you are doing with a Bash shell script.
But since you already have it all setup as a PHP script, you could probably do it something like this. Here I'm assuming you want it to run at 1:15 AM every day. If you don't have access to the actual crontab, then just ignore the leading numbers and asterisks. Code:
15 1 * * * /usr/bin/php /some/path/file.php |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|