RE: [PHP] Urgent help required for using Cron
Dear Javier, We have done the following as per your suggestion 15 17 * * * /path/to/your/php/binary /path/to/your/script.php After editing and saving crontab file the following message pops up at the commond prompt - crontab:installing new crontab crontab:error renaming cron/tmp.1885 to cron/root rename: is a directory crontab: edit left in /tmp/crontab.1885 It did not work. Please suggest what to do next? Regards Siva -Original Message- From: Javier Tacon [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2003 5:17 PM To: Safal Solutions Subject: RE: [PHP] Urgent help required for using Cron For example, you want execute a script every day at 09:00 am: $ crontab -e And put this line: 0 9 * * * /path/to/your/php/binary /path/to/your/script.php Crontab only can say if the cron was executed correctly or not, but it doesn't say if your script in php has sent the mail correctly or not. For debug if the mail was successfully sent, develope the debug into your script. You can use a some mail classes that they have debug options (for example I use phpmailer v1.65). -Mensaje original- De: Safal Solutions [mailto:[EMAIL PROTECTED] Enviado el: jueves, 28 de agosto de 2003 13:32 Para: PHP General Asunto: [PHP] Urgent help required for using Cron Hi friends, I have to send mail to people automatically at specified time . Our environment is RedhatLinux 7.3 , Apache ,mysql and php. I am writing a program in php to send the mail if some Condition is met. I want to activate this program at specified time using cron facility. So, How can we do that? Can any one help me?. I have another problem also. We want Cron to indicate ( through a message or a mail) to us that a given task is completed or not. In the present case Cron does a task of sending a mail to a user. After sending the mail we want Cron to indicate to us that the mail was successfully sent or not sent. This we want to know through a program because we want to use this as a part of automation of sending mails. Thanking you, Siva -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Urgent help required for using Cron
It seems problems with permissions. Can you pass me the output from ls -la /var/spool/cron/ May be exists a directory called root inside /var/spool/cron, so, if exists, you should delete it and try again. -Mensaje original- De: Safal Solutions [mailto:[EMAIL PROTECTED] Enviado el: viernes, 29 de agosto de 2003 3:37 Para: PHP General; Javier Tacon CC: Bimal Jain Asunto: RE: [PHP] Urgent help required for using Cron Dear Javier, We have done the following as per your suggestion 15 17 * * * /path/to/your/php/binary /path/to/your/script.php After editing and saving crontab file the following message pops up at the commond prompt - crontab:installing new crontab crontab:error renaming cron/tmp.1885 to cron/root rename: is a directory crontab: edit left in /tmp/crontab.1885 It did not work. Please suggest what to do next? Regards Siva -Original Message- From: Javier Tacon [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2003 5:17 PM To: Safal Solutions Subject: RE: [PHP] Urgent help required for using Cron For example, you want execute a script every day at 09:00 am: $ crontab -e And put this line: 0 9 * * * /path/to/your/php/binary /path/to/your/script.php Crontab only can say if the cron was executed correctly or not, but it doesn't say if your script in php has sent the mail correctly or not. For debug if the mail was successfully sent, develope the debug into your script. You can use a some mail classes that they have debug options (for example I use phpmailer v1.65). -Mensaje original- De: Safal Solutions [mailto:[EMAIL PROTECTED] Enviado el: jueves, 28 de agosto de 2003 13:32 Para: PHP General Asunto: [PHP] Urgent help required for using Cron Hi friends, I have to send mail to people automatically at specified time . Our environment is RedhatLinux 7.3 , Apache ,mysql and php. I am writing a program in php to send the mail if some Condition is met. I want to activate this program at specified time using cron facility. So, How can we do that? Can any one help me?. I have another problem also. We want Cron to indicate ( through a message or a mail) to us that a given task is completed or not. In the present case Cron does a task of sending a mail to a user. After sending the mail we want Cron to indicate to us that the mail was successfully sent or not sent. This we want to know through a program because we want to use this as a part of automation of sending mails. Thanking you, Siva -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Urgent help required for using Cron
Hi briefly: you need to create a cron job by typing crontab -e at the command line. each line in the crontab has five fields which define the time at which the cron job will run. more info in man cron and man crontab. Cron sends a mail to the owner of the job when a job fails. you can pipe it to a program (this has been discussed extensively in this group this week so i will not go into details) all the best Safal Solutions wrote: Hi friends, I have to send mail to people automatically at specified time . Our environment is RedhatLinux 7.3 , Apache ,mysql and php. I am writing a program in php to send the mail if some Condition is met. I want to activate this program at specified time using cron facility. So, How can we do that? Can any one help me?. I have another problem also. We want Cron to indicate ( through a message or a mail) to us that a given task is completed or not. In the present case Cron does a task of sending a mail to a user. After sending the mail we want Cron to indicate to us that the mail was successfully sent or not sent. This we want to know through a program because we want to use this as a part of automation of sending mails. Thanking you, Siva -- http://www.raditha.com/php/progress.php A progress bar for PHP file uploads. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Urgent help required for using Cron
[snip] I have to send mail to people automatically at specified time . Our environment is RedhatLinux 7.3 , Apache ,mysql and php. I am writing a program in php to send the mail if some Condition is met. I want to activate this program at specified time using cron facility. So, How can we do that? Can any one help me?. I have another problem also. We want Cron to indicate ( through a message or a mail) to us that a given task is completed or not. In the present case Cron does a task of sending a mail to a user. After sending the mail we want Cron to indicate to us that the mail was successfully sent or not sent. This we want to know through a program because we want to use this as a part of automation of sending mails. [/snip] Did you have a look at the tutorial I sent you? http://www.unixgeeks.org/security/newbie/unix/cron-1.html What, specifically, do you not understand? 1. From the command line type crontab -e. This brings up the cron list in vi 2. type i for the insert command 3. on the last line type the time you would like the cron to run, along with commands 15 3 * * * /usr/local/bin/php /path/to/my/mail_script.php will run the PHP script each morning at 3:15 AM 4. Hit 'escape' and type :w! to save 5. type :q! to quit The cron job will now run each morning at 3:15 AM HTH! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Urgent help required for using Cron
For example, you want execute a script every day at 09:00 am: $ crontab -e And put this line: 0 9 * * * /path/to/your/php/binary /path/to/your/script.php Crontab only can say if the cron was executed correctly or not, but it doesn't say if your script in php has sent the mail correctly or not. For debug if the mail was successfully sent, develope the debug into your script. You can use a some mail classes that they have debug options (for example I use phpmailer v1.65). -Mensaje original- De: Safal Solutions [mailto:[EMAIL PROTECTED] Enviado el: jueves, 28 de agosto de 2003 13:32 Para: PHP General Asunto: [PHP] Urgent help required for using Cron Hi friends, I have to send mail to people automatically at specified time . Our environment is RedhatLinux 7.3 , Apache ,mysql and php. I am writing a program in php to send the mail if some Condition is met. I want to activate this program at specified time using cron facility. So, How can we do that? Can any one help me?. I have another problem also. We want Cron to indicate ( through a message or a mail) to us that a given task is completed or not. In the present case Cron does a task of sending a mail to a user. After sending the mail we want Cron to indicate to us that the mail was successfully sent or not sent. This we want to know through a program because we want to use this as a part of automation of sending mails. Thanking you, Siva -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php