# Cron doesn't create snapshot (zfSnap)



## bsus (May 13, 2012)

Hi,

I followed DutchDaemon's advice using root's crontab instead of the system one:
`# crontab -e`

```
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin
#
#minute hour    mday    month   wday    who     command
#
# storage
58       8       *       *       *       root    zfSnap -a 30d storage/home/user
```

`# cat /var/log/cron`

```
May 13 08:58:00 server /usr/sbin/cron[8025]: (root) CMD (root    zfSnap -a 30d storage/home/user)
```

`# zfs list -t snapshot | grep storage/home/user@2012-05-13`
Lists no snapshots...

When I execute zfSnap manually it works.

What have I forgotten?

Regards


----------



## DutchDaemon (May 13, 2012)

Do you have 
	
	



```
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin
```
 in root's crontab as well?

Oh wait, that is the root user's crontab you posted? Take out the user field (#6). It's obviously not needed .. as you can see in the actual "CMD" that cron tries to execute.


----------



## bsus (May 14, 2012)

Yes, this was the issue 

Thank you works now again


----------

