Jump to content

Recommended Posts

Posted

Hello,

I have run couple of cron jobs, one for every 4 hours, one every 12 hours or so,

now I get email everytime the cron job is run, I want to prevent that,

 

I did read some post on the same issue here, that I can run another cron job like the following to prevent that :

 

/usr/bin/php -q /home/my-cpanel-id/public_html/my-path/my-script.php > /dev/null

 

but what should I replace with "my-script.php" ?

 

Thanks for help.

Posted

What does your current cron job look like ? What are you trying to do ?

 

Basically, you just need to add the " > /dev/null" onto the end of the cron job command

Posted (edited)

thanks for reply,

 

I have a autoresponder and there are 5 files that has to be run as cron job, and now working fine,

this is one the cron job:

 

0 */12 8 * * * /usr/bin/php -q /home/myId/public_html/scriptFolder/cron_peiodic.php
1- Now do you mean I should put " > /dev/null" at the end of every one of them?

 

like this:

0 */12 8 * * * /usr/bin/php -q /home/myId/public_html/scriptFolder/cron_peiodic.php > /dev/null

 

I would like to ask about the other post that I had about running a cron job, and your reply:

 

Why don't you get the autoresponder to be triggered by the email (rather than running it as a cron job). Then it would only run when you got an email - rather than every 5 mins. Likely to be much better on server load.

 

2- I appreciate if you give me more details on how to do it or any tutorial around.

 

thanks

Edited by greenworld
Posted

1. Every one that you are receiving email from, yes.

 

2. That would depend on the autoresponder being used. Take a look at hotscripts.com to find one that works off the email.

 

The only auto responder TCH has is the one included in cPanel. It works off the email and sends an automated reply based on how it is set up.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...