- Redirect output to a log file
01 14 * * * /home/joe/myscript >> /home/log/myscript.log 2>&1
-
Check expressions for crontab https://crontab.guru/#0_2___*
-
Log output cron
| #!/bin/bash | |
| process_name="xxxxx" | |
| if ! pgrep -x "$process_name" > /dev/null; then | |
| echo "The process $process_namen was not running at " $(date -u) >> ~/keep_alive.log | |
| ./xxxxxx & | |
| echo "The process $process_namen was restarted at " $(date -u) >> ~/keep_alive.log | |
| fi |
| package main | |
| import ( | |
| "bytes" | |
| "encoding/json" | |
| "fmt" | |
| "net/http" | |
| ) | |
| func main() { |
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "io" | |
| "log" | |
| "net/http" | |
| ) |
01 14 * * * /home/joe/myscript >> /home/log/myscript.log 2>&1
Check expressions for crontab https://crontab.guru/#0_2___*
Log output cron
| {"basics":{"name":"Daniel Estevez","label":"Software Developer at Ubisoft IT","image":"https://avatars.githubusercontent.com/u/495063?v=4","email":"","phone":"","url":"www.danielestevez.com","summary":"\n* Currently not looking for a job\n* Only 100% remote and 4-day week offers and will be considered or answered.","profiles":[{"network":"gitconnected","username":"danielestevez","url":"https://gitconnected.com/danielestevez"},{"network":"GitHub","username":"danielestevez","url":"https://github.com/danielestevez"},{"network":"LinkedIn","url":"https://www.linkedin.com/in/daniestevez/","username":"daniestevez"},{"network":"Stack Overflow","url":"https://stackoverflow.com/users/2369157/daniestevez","username":"daniestevez"}],"headline":"Software Engineer","blog":null,"yearsOfExperience":20,"username":"danielestevez","locationAsString":"Montreal","region":"Montreal","karma":14,"id":"6fa99d32-0bf7-4d53-a9d6-a8f437eba870","followers":20,"following":30,"picture":"https://avatars.githubusercontent.com/u/495063?v=4"," |
^(http|https)://([^/]*)/?
<image-name> docker rm $(docker stop $(docker ps -a -q --filter ancestor=<image-name> --format="{{.ID}}"))
docker exec -it container_id /bin/bash
sudo kill -9 $(pidof middleman)
| * Access JIRA with no SSO, just user/password | |
| https://[JIRA_URL]/jira/secure/Dashboard.jspa?os_username=[USER_NAME]&os_password=[USER_PASSWORD] |