Skip to content

Commit

Permalink
Merge pull request #88 from vasgat/staging
Browse files Browse the repository at this point in the history
updating start script to run update_cached_data script before setting up the cronjob
  • Loading branch information
vasgat authored Nov 22, 2024
2 parents c91111f + 862d25c commit 714baf1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cronfile
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*/1 * * * * ruby /fashionchecker/script/update_cached_data.rb
# Run the Ruby script every ten minutes
*/10 * * * * ruby /fashionchecker/script/update_cached_data.rb
5 changes: 4 additions & 1 deletion docker/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
# Start nginx in the background
nginx -g "daemon off;" &

# Start supercronic to run cron jobs
# Run the script immediately for the first time
ruby /fashionchecker/script/update_cached_data.rb

# Start supercronic to run cron jobs (updating cached data every 10 mins)
/usr/local/bin/supercronic /fashionchecker/cronfile

0 comments on commit 714baf1

Please sign in to comment.