crontab

Hi

I have an entry in the cron file.

10 3 * * * /usr/bin/test.sh

I want to change it to:

00 11 * * * /usr/bin/test.sh

how to do this without entering the crontab file and edit the change?

thank you

crontab -e

yes this edits the crontab file but I do not want to do this.

I need a command that change the crontab file without editing it manually on all servers

thank you

# save the crontab entries in a file
crontab -l > /tmp/myCron
# do the editing of /tmp/myCron
#
# reset the crontab from the edited file
crontab /tmp/myCron

perl -p -i -e 's/10\ 3\ \\ \\ \\ \/usr\/bin\/test.sh/0\ 11\ \\ \\ \\ \/usr\/bin\/test.sh/g' /var/spool/cron/crontabs/"USER"

Wow.. Taran's is so tedious.. But looks good :slight_smile: