Created
October 13, 2022 11:22
-
-
Save m-cakir/aa1d68833e6369e44b147558cfde4c7b to your computer and use it in GitHub Desktop.
Revisions
-
m-cakir created this gist
Oct 13, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ version: '3.1' services: snscrape: image: alpine:latest volumes: - ./:/usr/src/app working_dir: /usr/src/app entrypoint: - ./entrypoint.sh This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ #!/bin/sh chmod +x task.sh echo "* * * * * /bin/sh /usr/src/app/task.sh >> /usr/src/app/task.log 2>&1 # This extra line makes it a valid cron" > task-scheduler.txt crontab task-scheduler.txt touch task.log crond && tail -f task.log This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ #!/bin/bash timestamp=`date +%Y/%m/%d-%H:%M:%S` echo "[task] system path is $PATH at $timestamp"