Cronjob

  1. Installing CronTab on Amazon Linux 2023 EC2

  2. 등록 - 꿀팁: 크론잡 쉽게 생성하는 방법, 특별string

    1. Scheduler: /etc/crontab OR /etc/cron.d
    2. Jobs: /etc/cron.daily
      • cron.daily

        #!/bin/sh
        sudo /usr/sbin/logrotate /etc/logrotate.conf
        
      • 필수: 실행 권한으로 변경 → sudo chmod 755 $FILE_NAME

  3. 크론잡 명령어

    sudo systemctl status crond.service
    sudo systemctl restart crond.service
    

logrotate

로그파일을 따로 저장하고 관리하는 방법