Hi all!
I have some problems with a sheduled tasks for crond.
There is a test script backup_script.sh , that I'm trying to strat in ESXi:
Also, there is a job in /var/spool/cron/crontabs/root:
#min hour day mon dow command
1 1 * * * /sbin/tmpwatch.py
1 * * * * /sbin/auto-backup.sh
0 * * * * /usr/lib/vmware/vmksummary/log-heartbeat.py
0 0 * * * /vmfs/volumes/datastore1/ghettoVCB/ghettoVCB.sh -f /vmfs/volumes/datastore1/ghettoVCB/vm_list -g /vmfs/volumes/datastore1/ghettoVCB/ghettoVCB.conf -l /vmfs/volumes/datastore1/ghettoVCB/log > /dev/null
0 3 * * * /vmfs/volumes/datastore1/rsync/backup_script.sh > /dev/null
So, as I understand, crond has to start my script every day, but only once in 3:00
But I've got another results - there is an output of pidlog.log:
2013-02-13 03:00:01 PID:11263374 STARTED
11246988 11246988 sh 3324 3324 /bin/sh -c /vmfs/volumes/datastore1/rsync/backup_script.sh > /dev/null
11263374 11263374 sh 3324 3324 /bin/sh /vmfs/volumes/datastore1/rsync/backup_script.sh
11222417 11222417 grep 3324 3324 grep backup_*
2013-02-13 03:00:01 PID:11292068 STARTED
11246988 11246988 sh 3324 3324 /bin/sh -c /vmfs/volumes/datastore1/rsync/backup_script.sh > /dev/null
11263374 11263374 sh 3324 3324 /bin/sh /vmfs/volumes/datastore1/rsync/backup_script.sh
11292066 11292066 sh 11279503 11279503 /bin/sh -c /vmfs/volumes/datastore1/rsync/backup_script.sh > /dev/null
11292068 11292068 sh 11279503 11279503 /bin/sh /vmfs/volumes/datastore1/rsync/backup_script.sh
11296178 11296178 grep 11279503 11279503 grep backup_*
As you can see my script is started twice. First time it was started by a process with PID 3324 wich is busybox:
~ # ps -P | grep 3324
3324 3324 busybox 2163 /bin/busybox
Secind time it was started by a process with PID 11279503 wich is crond:
~ # ps -P | grep 11279503
11279503 11279503 crond 2163 /bin/crond
I can't understand, why does it work this way?
Any ideas?
Thanks.