-1

Sorry,But i know english a little bit :) , Thank help. Bash I need to delete data 90 day ago and save Data Delete

Next > condition crontab -e

* * * * * /root/file.sh >> /root/textsh.txt

Result : cat textsh.txt
         []

I learning shell,cron,other But,i concentrate to learn i hope to nice programmer

chmod +x file.sh
Mit CPC
  • 11
  • 7

1 Answers1

0

Did you check the execute permission on /root/file.sh? If it is not executable, you will end up with a zero byte /root/textsh.txt file.

Run /root/file.sb on the command prompt before putting it on cron. Also, it is good to send cronjob's errors to a separate file.

codeforester
  • 39,467
  • 16
  • 112
  • 140