Auto scheduling

I’ve been checking syslog, but don’t see anything related to the autoscheduling. This is all I get:

pi@SATNOGS-QFH:~ $ grep -i -e "cron" /var/log/syslog
Aug 23 07:17:01 SATNOGS-QFH CRON[21032]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Aug 23 08:17:01 SATNOGS-QFH CRON[21059]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Aug 23 09:17:01 SATNOGS-QFH CRON[21083]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Aug 23 10:17:01 SATNOGS-QFH CRON[21110]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Aug 23 11:17:01 SATNOGS-QFH CRON[21135]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Aug 23 12:17:01 SATNOGS-QFH CRON[21172]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Aug 23 13:17:01 SATNOGS-QFH CRON[21200]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Aug 23 14:17:01 SATNOGS-QFH CRON[21225]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Aug 23 15:17:01 SATNOGS-QFH CRON[21250]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Aug 23 16:17:01 SATNOGS-QFH CRON[21319]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Aug 23 17:17:01 SATNOGS-QFH CRON[21345]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)

@1guyfromhalton I think this is a cron problem. I’m going to put some dummy scripts in there to see if they run or not, to at least make sure the my cron is running… I will report back with results (sorry for the late response, I was travelling in Ontario this week).

[edit] Well, now my station 272 autoscheduler does NOTHING at all (it runs, but it ends up just listing the existing observations, and doesn’t schedule any new ones), even when run from the command line. Really scratching my head on this one…

Ok, I believe I have the solution for my cronjobs not running.

I had been using a “sudo crontab -e” command to create the cron job.
As soon as I changed it to just “crontab -e”, it appears the job is running as desired (on my 187 station. Still need to find out whats up with 272).

I post my blunders so that others can avoid the embarrassment of failure. :slight_smile:

1 Like

On my 272 station, this is what I get when I run the autoscheduler at the command line:

pi@SATNOGS-QFH:/ $ /home/pi/autosked/gitclone/satnogs-auto-scheduler/schedule_single_station.py -s 272 -d 47 -P /home/pi/autosked/gitclone/satnogs-auto/scheduler/priorities_272.txt -f2019-08-23 18:38:08,454 - root - INFO - Requesting information for ground station 272
2019-08-23 18:38:09,589 - root - INFO - Ground station information retrieved!
2019-08-23 18:38:09,603 - root - INFO - Finding all passes for 147 satellites:
100%|██████████| 147/147 [01:00<00:00,  2.43it/s]
2019-08-23 18:39:10,223 - root - INFO - Requesting scheduled passes for ground station 272
2019-08-23 18:39:11,520 - root - INFO - Scheduled passes for ground station 272 retrieved!
2019-08-23 18:39:11,531 - root - INFO - Found 9 scheduled passes between 2019-08-23 18:38:08 and 2019-08-25 17:38:08 on ground station 272
2019-08-23 18:39:11,554 - root - INFO - 9 passes selected out of 1076, 4537 s out of 142769 s at 3.178% efficiency
2019-08-23 18:39:11,557 - root - INFO - GS  | Sch | NORAD | Start time          | End time            |  El | Priority | Transmitter UUID       | Mode       | Satellite name 
2019-08-23 18:39:11,559 - root - INFO - 272 |   1 | 39444 | 2019-08-23T22:46:54 | 2019-08-23T22:51:22 |  70 | 1.000000 | iXwP5z3WSrJYoLviKuKRYL |            | 
2019-08-23 18:39:11,559 - root - INFO - 272 |   1 | 43137 | 2019-08-24T02:30:07 | 2019-08-24T02:33:26 |  63 | 1.000000 | 3rLGJWqj3XZ6Z8vADCRwiW |            | 
2019-08-23 18:39:11,560 - root - INFO - 272 |   1 | 33591 | 2019-08-24T10:42:15 | 2019-08-24T10:53:14 |  78 | 1.000000 | kE4VaYKpnFmzEquEjKKi8D |            | 
2019-08-23 18:39:11,561 - root - INFO - 272 |   1 | 25338 | 2019-08-24T12:29:17 | 2019-08-24T12:44:48 |  82 | 1.000000 | mjsHcYajEgbiS9cbKfecGo |            | 
2019-08-23 18:39:11,562 - root - INFO - 272 |   1 | 28654 | 2019-08-24T14:26:59 | 2019-08-24T14:38:04 |  72 | 1.000000 | u2h8AaSR7ZJPreFgVDtcfP |            | 
2019-08-23 18:39:11,562 - root - INFO - 272 |   1 | 43137 | 2019-08-24T15:32:24 | 2019-08-24T15:35:58 |  89 | 1.000000 | 3rLGJWqj3XZ6Z8vADCRwiW |            | 
2019-08-23 18:39:11,563 - root - INFO - 272 |   1 | 39444 | 2019-08-24T23:05:06 | 2019-08-24T23:09:36 |  74 | 1.000000 | iXwP5z3WSrJYoLviKuKRYL |            | 
2019-08-23 18:39:11,564 - root - INFO - 272 |   1 | 33591 | 2019-08-25T10:30:35 | 2019-08-25T10:41:36 |  83 | 1.000000 | kE4VaYKpnFmzEquEjKKi8D |            | 
2019-08-23 18:39:11,565 - root - INFO - 272 |   1 | 28654 | 2019-08-25T14:15:13 | 2019-08-25T14:26:23 |  90 | 1.000000 | u2h8AaSR7ZJPreFgVDtcfP |            | 

Any advice as to why it now doesn’t actually schedule new observations (it appears this happened after updating to the newest release).

[edit] ARGH!!! look at the path for the priorities file above!!! :sleeping: I need to wake up!!!

You need an old account system until we land scheduling API. Let me know in pm your username in network site in pm and I’ll send you details.

By the way I’m working on testing the scheduling API locally, soon will be in MR.

Hi Roy,

The column denoted Sch indicates passes which have already been scheduled at this station. It looks like this job covers a time range that is already fully scheduled.

Actually, what had happened was I copied the path for the priorities file incorrectly ("/satnogs-auto/scheduler/" instead of “/satnogs-auto-scheduler/”), so it looked for a list of priorities that didn’t exist, and hence scheduled no observations.

:smile:

Good news, though: After much blundering and fat fingering on my part, I believe the auto scheduling is up an running on both stations! Thanks everyone, for the much needed help!

–Roy
K3RLD

1 Like

@fredy Looks like I also have only a new account. I’ll PM you my username. Thank you for helping. This is great!

Hello Fredy … last time I checked the forum on auto-scheduling dates Aug 23. Is there an update since then ? Thanks.

@frenchbazou yes there is a new version in order to make auto-scheduler compatible with the new network release. Take a look in this thread for more details.

@fredy … thank you for the info.
I did a git-pull (https) on the dir for the scheduler, changed my (not legacy) network password to have no special characters only letters and digits, tried it again but it is not working. Tried also with an API key - same thing.
Running on my satNOGS station, a Pi3 “Linux pi401e 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux”.
Thanks

1 Like

It looks like the new_scheduling_api branch by wose is working thusly:

git clone
https://gitlab.com/wose/satnogs-auto-scheduler
cd satnogs-auto-scheduler
git checkout remotes/origin/feature/new_scheduling_api
cp env-dist .env
vim .env # or your favorite editor, set your API key
source .env
./schedule_single_station.py -s 99999   # use your station number not 99999

Whooooo ! this is cool !
Many thanks jebba for the info and instructions
I’m a free man … :0)

1 Like

Please confirm if it works for you, I’m not sure it is all going.

Well, added a cron job at 04:00 hrs to find and add possible observations for the next 24 hours based on my priorities (and preferences) for my satNOGS station 901 and it worked.
Will let my settings as is and advise you tomorrow.
Again, thank you for the info.

2 Likes

Please refrain from scheduling so far in advance. Rather stick to 2-3 hours scheduling duration every 1-2 hours on a cron job :wink:

2 Likes

pierros …

Yesterday I scheduled my station (901) for 24 hours and I got this error :

Traceback (most recent call last):
File “./schedule_single_station.py”, line 292, in
main()
File “./schedule_single_station.py”, line 230, in main
priorities, favorite_transmitters = read_priorities_transmitters(priority_filename)
File “/usr/local/bin/satnogs-auto-scheduler/utils.py”, line 20, in read_priorities_transmitters
prio = parts[1]
IndexError: list index out of range

And before I read your reply to schedule for a shorter period of time, I tried to re-scheduled for only 4 hours and it worked. So that seems to corroborate your suggestion.

Also, yesterday I then tried to schedule another station (1068) for 24 hours and it worked.
Go figure.

Anyway, I will change my scheduling to both of these stations to occur every 4 hours for 4 hours and see what happens.

Thank you for the mentoring.
Will keep you posted.

2 Likes

Ok got some info here.
After this last scheduling via crontab, I had the same error :
“IndexError: list index out of range”

After looking at utils.py, in which the error originates, this error occurs while reading the priorities.txt file.
The error was due to the fact that the last line was empty : corrected that.

I ran the scheduler again multiple times with the same priorities.txt file and now all looks OK.

1 Like

I thought I’d have a go at this and got an error

Traceback (most recent call last):
  File "./schedule_single_station.py", line 8, in <module>
    from utils import get_priority_passes, \
  File "/home/pi/satnogs-auto-scheduler/utils.py", line 79
    def print_scheduledpass_summary(scheduledpasses, ground_station_id, printer=print):

Is this the same as yours @frenchbazou? I looked into schedule_single_station.py and not being expert at this I couldn’t see anything ifferent between this and subsequent lines in terms of extra spaces.

I’d like to implement this so any help would be appreciated

@frenchbazou: I opened the issue satnogs-auto-scheduler#19 to track the fix of the auto-scheduler crashing for malformed transmitter files. It was already reported by others via IRC and a fix is available, but I didn’t create an issue until now…

Please feel free to also open issues directly via gitlab when you find bugs!

@g7kse: This seems to be a different error. Unfortunately the log is truncated so I can’t see what is going wrong. Can you re-post the full log please (feel free to create a new thread in this forum for this)?

1 Like

@g7kse, this is not the same issue that I reported. The error that I reported was that I had an emply line in the file (“priorities.txt”) where the priorities are described during the execution of the schedule_single_station.py script.

In a cron job, I execute the schedule_single_station.py script with the line :
“./schedule_single_station.py -s 901 -d 5 -P priorities.txt”

After I removed the empty line (at the end of the priorities.txt file), the scheduler worked perfectly.
Been working fine since them, no error (good job !).

3 Likes