Crontab is not working on Amazon EC2 server

前端 未结 5 610
渐次进展
渐次进展 2020-12-21 14:52

Crontab is not working on Amazon EC2 Linux Server.

I have saved below codes in /etc/crontab file

crontab
# For details see man 4 crontabs 
# Example          


        
5条回答
  •  没有蜡笔的小新
    2020-12-21 15:40

    I recently began using Amazon's linux distro on ec2 instances and after trying all kinds of things for cron all I needed was:
    sudo service crond start
    crontab -e
    This allowed me to set a cron job as "ec2-user" without specifying the user. For example:
    0 12 * * * python3 example.py
    In fact, specifying a user here prevented it from running.

提交回复
热议问题