Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Zip with crontab

Status
Not open for further replies.

zaradell

Technical User
Dec 21, 2007
77
PT
Good afternoon to you all

I really need help...

I´m having a problem using ZIP with crontab. For some reason the cronjob it not being made as specified in crontab.When i run the command in CLI it works fine. The problem is just when i try to run it in crontab:

30 12 20 * * root /usr/bin/zip -r /Copy/$(date +%Y_%m_%d).zip /Backups_Tools_Automatic/Nagios/*


I´ve tried creating a script .sh and run it with crontab but no luck. I´ve tried to remove "root" from the begining of the line, but nothing. I´ve also tried to replace $(date +%Y_%m_%d).zip with name.zip but also nothing.

Is there anything specific I have to do, so that ZIP works with Crontab?

I´d really apreciate some help.

Thkx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top