diff --git a/schedule.sh b/schedule.sh index 00215a1..4277827 100755 --- a/schedule.sh +++ b/schedule.sh @@ -64,7 +64,6 @@ function schedule_pass() { sleep $(echo ${time} | cut -d'.' -f2) wxrx run $(satellite_name_flag "${satellite}") --duration ${duration} >> ./wxrx-log EOF - } # @param string mock for `atd` @@ -72,7 +71,7 @@ function schedule_passes() { local at=${1:-'at'} while read -r line; do - schedule_pass 'mock_at' ${line} + schedule_pass "${at}" ${line} done } @@ -83,7 +82,11 @@ function unschedule_passes() { # atrm $line # done # >${jobfile} - atrm $(atq -q w | cut -f1) + local jobs=$(atq -q w | cut -f1) + if [ -n "${jobs}" ]; then + # log "Removing atd job: %s" "$(echo $jobs)" + atrm $(echo ${jobs}) + fi } diff --git a/wxrx.sh b/wxrx.sh index 3161c00..3ab5e40 100755 --- a/wxrx.sh +++ b/wxrx.sh @@ -50,7 +50,8 @@ case "$command" in ## pass Capture and decode a pass occuring NOW 'pass') - printf "TODO\n" + shift + HELP=$command_help ${rootdir}/run_station.sh $@ ;; ## update Update satellite telemetry @@ -61,7 +62,8 @@ case "$command" in ## schedule Schedule a future pass with `atd` 'schedule') - printf "TODO\n" + shift + HELP=$command_help ${rootdir}/schedule.sh $@ ;; '*')