# How do I find out what is this cron job and delete it?



## Brajeshwar (Mar 28, 2007)

Hi,

I think I did this myself but now I don't know how to remove this.

There is a cron job running daily which backs up my mail to an email address and is slowing down my machine. I've also deleted that particular folder location but the cron job still runs. So, please help me to find or how to look for cron jobs running on my mac and stop it or delete it.

This is the message on the email

Cron <brajeshwar@Brajeshwar> /Users/brajeshwar/Library/Application\ Support/Maza\ Digital/Email\ Backup/emailBackup.sh >> /Users/brajeshwar/Library/Logs/EmailBackup.log

btw, I have deleted that Maza digital folder altogether and the EmailBackup.log shows just "backing up, success" message.

Thanking in anticipation.

Regards
Brajeshwar


----------



## macbri (Mar 28, 2007)

Open a terminal and in there type:


```
crontab -l
```
This should list the contents of the crontab script.  If it's a single line and you want to stop it altogether, you can remove it entirely with:

```
crontab -r
```
This removes the *entire* crontab file so be careful if you've got other cron jobs listed in there!

If there's other lines in it though, and you want to keep them, instead do:

```
crontab -e
```
 which will allow you to edit the crontab file, deleting or commenting out the offending line for example.


----------



## Brajeshwar (Mar 29, 2007)

cool, thanks a lot. I saw the cron, did "crontab -r" and I think it is gone.


----------



## barhar (Mar 29, 2007)

While 'crontab -l' (or -r, or -e) applies to 'crontab' of the current user, such does not affect the 'crontab' file at '/etc/'.

In 'Terminal' (in the '/Applications/Utilites/' folder), enter ...

cat /etc/crontab

... and press <return>; or, in 'Finder' - select the 'Go, Go to Folder...' menu item, enter '/etc/' (less the single quote marks), click on the 'Go' button (of the drop down sheet or the 'Go to Folder' window), and - locate and double click on the 'crontab' file.

Now, determine whether or not a 'mail' related command is present.


----------



## macbri (Mar 29, 2007)

barhar said:


> While 'crontab -l' (or -r, or -e) applies to 'crontab' of the current user, such does not affect the 'crontab' file at '/etc/'.



This is a good point, but the output of the OP's cron job indicates that it is the current user's crontab entry:



> Cron <brajeshwar@Brajeshwar>


----------

