How do I create a crontab through a script

前端 未结 12 1044
再見小時候
再見小時候 2020-11-28 01:36

I need to add a cron job thru a script I run to set up a server. I am currently using Ubuntu. I can use crontab -e but that will open an editor to edit the curr

12条回答
  •  孤城傲影
    2020-11-28 02:34

    Cron jobs usually are stored in a per-user file under /var/spool/cron

    The simplest thing for you to do is probably just create a text file with the job configured, then copy it to the cron spool folder and make sure it has the right permissions (600).

提交回复
热议问题