2
  • We have to use crontab -e to add a cronjob to crontab.
  • And crontab -r to remove cronjobs.
  • Here, no Copy & Paste not allowed.

I need to add a script to cron.daily, how to add?

7

Just drop an executable file (shell script or otherwise) in that folder and Bob's your uncle.

1
1

Just place the script into the cron.daily directory; use cp to copy it from wherever it is to start with.

If you need script adding a line to an existing file the easiest way is

echo "Line to add" >> /path/to/file.txt

Which will append the new line to the end of the file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.