开发者

How to use crontab for sending weekly email in php? [closed]

开发者 https://www.devze.com 2023-02-16 11:17 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so 开发者_C百科that it can be reopened, visit the help center. Closed 10 years ago.

i am new to php... and i dont know how to use crontab widget..can anybody explain me...how to send weekly emails...


This will run a job weekly:

0 0 * * 0 /path/to/php yourscript.php

Nice intro to cron and crontab.


TO your problem there is 2 step solution

  1. Create cron tab using crontab -e command, add a following line to your cron: 0 0 * * 0 php your/php/script/path/email_script.php

  2. Create a Email script and write yor email functions here.
    Note: If you are including a file in your script make sure that you give full path "/var/www/"

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号