Page 1 of 1

Scheduling not working after sleep mode

Posted: May 5th, 2012, 3:47 pm
by localjoost
I have configured my HTPC as follows:

02:45AM: Windows task: Exit standby
03:05AM: Sabnzbd schedule: Resume
05:50AM: Sabnzbd schedule: Pause All
06:00AM: Windows task: Standby PC

Now this seems like something that has to work, and it seems to, partly.

In the sanbzbd log I can see these entry's:

Code: Select all

2012-05-04 02:49:33,585::INFO::[rss:484] Starting scheduled RSS read-out
2012-05-04 02:49:33,766::INFO::[rss:338] Failed to retrieve RSS from http://beta.nzbs.org/rss?t=-2&dl=1&i=737&r=099d605d627d5a0fd97d120b00cc4e05&del=1: <urlopen error (11004, 'getaddrinfo failed')>
2012-05-04 02:49:48,779::INFO::[__init__:846] Saving data for rss_data.sab in C:\Users\Media\AppData\Local\sabnzbd\admin\rss_data.sab
2012-05-04 02:49:48,792::INFO::[rss:498] Finished scheduled RSS read-out
So i would expect one of the next entries to mention the resume task at 03:05AM, but nothing happens.

The exit standby and standby tasks work, hence the log entries and the fact that the system is back in standby mode in the morning.
Also the pause task works, as I have just left it on at some point and went to bed, and woke up to an empty queue, paused and all.

I have tried to schedule the same tasks at a time the system is on.
This seems to work fine as i can see in the log:

Code: Select all

2012-05-05 22:31:18,559::DEBUG::[scheduler:172] Starting scheduler
2012-05-05 22:33:00,000::INFO::[downloader:194] Resuming
2012-05-05 22:33:00,000::DEBUG::[__init__:479] PAUSED_ALL inactive

2012-05-05 22:35:00,000::INFO::[downloader:203] Pausing
2012-05-05 22:35:00,000::INFO::[nzbqueue:170] Saving queue
2012-05-05 22:35:00,401::INFO::[__init__:846] Saving data for queue9.sab in C:\Users\Media\AppData\Local\sabnzbd\admin\queue9.sab
2012-05-05 22:35:00,404::INFO::[__init__:846] Saving data for totals9.sab in C:\Users\Media\AppData\Local\sabnzbd\admin\totals9.sab
2012-05-05 22:35:00,405::INFO::[__init__:846] Saving data for rss_data.sab in C:\Users\Media\AppData\Local\sabnzbd\admin\rss_data.sab
2012-05-05 22:35:00,414::INFO::[__init__:846] Saving data for bookmarks.sab in C:\Users\Media\AppData\Local\sabnzbd\admin\bookmarks.sab
2012-05-05 22:35:00,417::INFO::[__init__:846] Saving data for watched_data.sab in C:\Users\Media\AppData\Local\sabnzbd\admin\watched_data.sab
2012-05-05 22:35:00,418::INFO::[postproc:83] Saving postproc queue
2012-05-05 22:35:00,420::INFO::[__init__:846] Saving data for postproc1.sab in C:\Users\Media\AppData\Local\sabnzbd\admin\postproc1.sab
2012-05-05 22:35:00,421::DEBUG::[__init__:471] PAUSED_ALL active
So the question is, what the .. is going on here?

Re: Scheduling not working after sleep mode

Posted: May 5th, 2012, 3:58 pm
by shypike
You could let SABnzbd let the system go into standby.
BTW: change your nzbs.org apikey asap, since you exposed in the log fragments.

Re: Scheduling not working after sleep mode

Posted: May 5th, 2012, 4:10 pm
by localjoost
Thanks for the pointer to the key, changed right away..

On topic: Entering standby is not the issue, that works, also exiting standby is not the problem.
It just seems that the scheduling isn't working after it exits standby..

Re: Scheduling not working after sleep mode

Posted: May 5th, 2012, 4:58 pm
by shypike
localjoost wrote: It just seems that the scheduling isn't working after it exits standby..
Not in my experience, but it won't hurt to look at it again.
Please have some patience, because I have a fairly long todo list for release 0.7.0.

Re: Scheduling not working after sleep mode

Posted: May 5th, 2012, 5:09 pm
by localjoost
Actually i don't really think it is a bug, since the test i mentioned earlier was also within minutes after exiting standby...
Just wondering if it's an error or setup fail on my side...

The log does mention scheduling the actual instances of pause and resume..

Code: Select all

2012-05-05 22:31:16,555::DEBUG::[scheduler:199] Stopping scheduler
2012-05-05 22:31:18,552::DEBUG::[scheduler:267] Schedule check result = (2, 'resume', None, '33 22 * resume ')
2012-05-05 22:31:18,553::DEBUG::[scheduler:267] Schedule check result = (4, 'pause_all', None, '35 22 * pause_all ')
2012-05-05 22:31:18,555::DEBUG::[scheduler:267] Schedule check result = (8939, 'resume', None, '30 3 * resume ')
2012-05-05 22:31:18,555::DEBUG::[scheduler:267] Schedule check result = (9084, 'pause_all', None, '55 5 * pause_all ')
2012-05-05 22:31:18,555::DEBUG::[scheduler:123] scheduling resume([]) on days [1, 2, 3, 4, 5, 6, 7] at 3:30
2012-05-05 22:31:18,556::DEBUG::[scheduler:123] scheduling pause_all([]) on days [1, 2, 3, 4, 5, 6, 7] at 5:55
2012-05-05 22:31:18,556::DEBUG::[scheduler:123] scheduling resume([]) on days [1, 2, 3, 4, 5, 6, 7] at 22:33
2012-05-05 22:31:18,558::DEBUG::[scheduler:123] scheduling pause_all([]) on days [1, 2, 3, 4, 5, 6, 7] at 22:35
2012-05-05 22:31:18,559::DEBUG::[scheduler:136] Scheduling RSS interval task every 20 min (delay=4)
2012-05-05 22:31:18,559::DEBUG::[scheduler:147] Scheduling VersionCheck on day 5 at 19:32
2012-05-05 22:31:18,559::DEBUG::[scheduler:172] Starting scheduler

Re: Scheduling not working after sleep mode

Posted: May 6th, 2012, 1:13 am
by shypike
This a log of SABnzbd starting up.
You're claiming that schedules no longer trigger after coming out of standby.
I'll look into that.
BTW: an alternative is to do a scheduled exit for SABnzbd
and a scheduled launch (from Windows scheduler) of SABnzbd after
the system comes out of standby.

Re: Scheduling not working after sleep mode

Posted: May 6th, 2012, 9:54 am
by localjoost
Thanks, I will try that!
I will start with a daily restart of sabnzbd, maybe that works.

I have left the system on and running last night, and the queue unpaused.
When i woke it up from standby just now, i saw that the queue was nice and empty, and paused.
So to sum it up, the pause works, just the resume doesnt.