After I've completed my first working Python script, the last step was to automate the script execution in my Ubuntu server via crontab. As a Unix sysadmin I thought this was a piece of cake but I made a noob error somehow.
* 18 * * * /home/ubuntu/miniconda3/bin/python /home/ubuntu/vornix_posting_bot.py >> /home/ubuntu/logs/vornix.log 2>&1
This was what I added in the crontab file with simple command just to execute the script and output errors into a log fine. The execution time was ideally plan to be at 1800 every day. Note that the first * here was representing the minute.
Luckily I did not put the script into produection straight away as the next day I found out crontab was executing the command once every single minute.
Huge mistake and here is what I have done to fix it:
* with 0.0 18 * * * /home/ubuntu/miniconda3/bin/python /home/ubuntu/vornix_posting_bot.py >> /home/ubuntu/logs/vornix.log 2>&1
cron service by service cron restart in Ubuntu OS and check the status with service cron status. The previous job should be ended now.