I'm trying to add 2 shell scripts to cron. If I use the following command to add the 1st script:
Code: Select all
sudo echo "*/1 * * * * /home/centos/fecha.sh" | sudo crontab -u centos -
Code: Select all
sudo echo "*/3 * * * * /home/centos/fecha3.sh" | sudo crontab -u centos -
Code: Select all
sudo (crontab -l -u centos; echo "*/1 * * * * /home/centos/fecha.sh") | crontab -u centos -
Code: Select all
-bash: syntax error near unexpected token `crontab'