0

I am trying to configure a crontab from a .sh file. When this script will run on the server it should do the configuration. But when I try to edit the crontab by command "crontab -e" it doesn't come out of the editor. I am not getting which command I can write in my shell script file so that it will allow to write in the editor and then exit from editor.

My code to configure crontab is follows

crontab -e
echo "* * * * * run-parts /maven/abc.sh" 
crond /maven/logs/log.txt
Archemar
  • 31,554
  • Would you consider a change to your workflow where you put the desired contents into a file can call crontab /that/file? – Jeff Schaller May 06 '21 at 19:45
  • I am creating a script file to do the configuration as we cannot ssh into the container. Can you provide example of what you are suggesting? – user470455 May 07 '21 at 04:37

0 Answers0