INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Using Scheduler to update Smartlists?  (Read 3294 times)

Afrosheen

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 313
Using Scheduler to update Smartlists?
« on: February 13, 2016, 10:33:53 am »

Is there a way to configure the Scheduler service to essentially "refresh" a specific smartlist, or a group of smartlists?

I've made ten or so random albums smartlists for each genre I hve.  What I would like to do is to have these smartlists refreshed each week since I can't refresh them when I play an album on JRemote.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Using Scheduler to update Smartlists?
« Reply #1 on: February 13, 2016, 05:29:57 pm »

MCC_REFRESH (22007) seems to work for me.

So you'd want to schedule a web command. You could use a simple shell script, and then schedule it with Automator and Calendar, Hazel, Launch Control, cron/launchd, or Cocktail or something.

Code: [Select]
#!/bin/bash
curl -- "http://username:password@localhost:52199/MCWS/v1/Control/MCC?Command=22007"
echo -e "\n\nstatus returned was: $?"

I'm pretty sure that would do it. You could schedule it every day, or whatever you want.

If that doesn't work, you could script it to restart using this instead:
http://localhost:52199/MCWS/v1/Control/CommandLine?Arguments=/Restart

But MCC_REFRESH worked for me when I just tested briefly.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Using Scheduler to update Smartlists?
« Reply #2 on: February 13, 2016, 05:46:55 pm »

Very nice Glynor.  Seems to work correctly.

Brian.
Logged

Afrosheen

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 313
Re: Using Scheduler to update Smartlists?
« Reply #3 on: February 13, 2016, 09:38:28 pm »

This is perfect!  Thanks for delivering the goods Glynor! 
Logged
Pages: [1]   Go Up