#!/bin/bash
# source: https://gist.github.com/dzuelke/5cd7e4772120ba098a8427e1efbc61a9
topofminute() {
local now;
while true; do
now=$(date "+%S")
now=${now#0} # strip leading zero for arithmetic operations
# run command only if less than ten seconds have passed in the current minute
if [[ "$now" -le 10 ]]; then
# run command in the background
"$@" &
fi
# echo "sleeping for $((61-now)) seconds..."
sleep $((61-now))
done
}
topofminute php artisan schedule:run
I deploy a new version everytime. This means, supervisord is already restarted. That's why I am not getting why the Scheduler is still using the old code and not the new one. Bottom line, the new code overrides the old code
@BilalHaidar Hi Bilal, did you ever solve this issue. I have a very similar set up and I am having similar troubles.
For some reason, even if I update the command to not 'ENV_APP_DIR', it still says I don't specify it.
When I do specify 'APP_DIR' to any path, it tells me that the variable does not exist.