1

My cron job in my cpanel looks like this

cd public_html/Staging/ff; perl sendmail.pl >/dev/null

enter image description here

The sendmail.pl looks like this

my $php = `php decode.php`;

The decode.php looks like this

$user = "Hello";
$fh = fopen("output.txt","a+");
fwrite($fh,$user."\n");
fclose($fh);

output.txt file gets on updating every second, even though i've called it for 1 hour.

Now how do i stop this job based in PID?

Where should i find PID?

How do i find all cron jobs running right now? and stop it at once?

I wanted to call sendmail.pl every hour.

Loura
  • 109
  • 5
  • 18
  • "I am using cpanel on windows machine" -- that doesn't even make sense. According to their [system requirements](https://documentation.cpanel.net/display/ALD/Installation%20Guide%20-%20System%20Requirements), cPanel only runs on Linux. – Matt Jacob Nov 17 '15 at 16:43
  • Thanks. and yes i know thats nothing to do with cpanel. I am accessing my linux server through cpanel from wiindows machine.. I am unable to stop my cron job.. how do i do it? – Loura Nov 18 '15 at 06:19
  • `top` or `ps` to get the pid, and then `kill`. – Matt Jacob Nov 18 '15 at 06:31

1 Answers1

1

Since you have * in minute it now runs every minute. Try putting a value there (for instance 0) to run it every hour on that minute number. And only have star in hour.

bolav
  • 6,938
  • 2
  • 18
  • 42