In PHP which function use for background process? Like if data insert in PHP after that send email to user but in background without loading then which function used?
Tarun Vaghela Answered on 20 Nov, 2018

Hello.. As while mailing from website it takes few seconds to send it and for this duration our website gets stuck.

So to send mail in background you have to create Cron Jobs which will run in background at given time (i.e in every 5 minutes). With this approach your website does not load and stuck.

Follow are the steps to create Cron Job. I am assuming that you are using cPanel.

1. Create sendmail.php file. Which is automatically call when your cron job execute. Put your sendmail.php file in public_html on your sever.

2. Go to cPanel dashboard and find cron job.

3. Set given options accoring to your requirements.

4. Now provide below command in Command textbox and click Add New Cron Job.

/usr/local/bin/php /home/user_name_of_cpanel/public_html/cron.php 1>> /dev/null 2>&1

If you want to execute Cron Job in local in your pc please visit my blog How to send mail using PHPMailer in background with help of php and Cron Job.

Hope this will help you. If you have any query please comment.

Raman Ruth Answered on 27 Dec, 2018

back ground process is good and nice for me. In this post is more useful for me to collect my needed information. Some of approaches and steps are given clear way for the readers. I am getting file and good job from this post. I have getting more experience in set the background process. it is really amazing for me. And collect some of functions for me. In these jobs is getting good execution and assuming functions. I have need the possible way and methods for set the background color and theme for my blog post. I am setting all the functions in my blog but i cannot know the useful information from my friend. He is helping me for all post to submit with successful way.  And i am collecting ideas and tips from him. I have collected the answers and queries from my web page. I am adding some of new questions and command box also. How to set the new cron job function and i need the brief information about that. I am searching the needed information from online. I cannot understand the lines. Please enter the points and advices in my given boxes. i am need to apply pan card online for registering the blog. It is given some of supportive nature of points and i am using mail id for storing the main documents. I am searching some of reference items and helps from my friend. My father is given some instructions and ideas for submitting the background color and others. My posts are getting clear and understandable nature of lines. I am searching the way of collecting the main and important cron job in online. It is supply the good news and reference advices for the readers here. I am analysis the great section of points related messages from the discussion here. Tell me here