RDS Database

  1. create database
  2. create security group – inbound rules (prideti ip address is kurio leisti jungtis)
  3. update database password (modify instance)
  4. install MySql workbench (https://dev.mysql.com/downloads/workbench/)
  5. connect with MySql Workbench and create database: CREATE DATABASE `test_db1` CHARACTER SET `utf8mb4` COLLATE `utf8mb4_unicode_ci`
  6. php arsisan migrate –seed

cronjob

 

Add conjob example
chmod +x /var/mycommands/file.sh
crontab -e (edit file)
0 * * * * sh /var/mycommands/file.sh > var/mylogs/file.log

cronjobs list
crontab -l

//-------- turn on logs ----------
nano /etc/rsyslog.d/50-default.conf
cron.*   /var/log/cron.log
service cron restart
//-------------------------------------

//------fix permissions --------
crontab -e & update file
//-------------------------------

cronjob example: every minute
https://crontab.guru/#*/1_*_*_*_*

processed cronjobs filtered by filename
grep -i "file.sh" /var/log/syslog

https://stackoverflow.com/questions/28235524/how-to-run-a-php-script-daily-with-the-cron-job-on-ubuntu-os