Jump to content

Does Each Scheduled Task create it's own timer, or is there a global Emby Timer in the API


chef

Recommended Posts

chef

@@ebr or @@Luke

 

I'm currently trying to create a helpful plugin, which will attempt to better sort physical media files over several computer drives.

 

I need to create a Scheduled Task which monitors a folder. Is there a timer built into the Plugin API that I can use, or would creating my own Threading Timer (for a folder monitor) be a better coarse of action?

 

I'm not interested in adding CPU usage if not necessary.

 

 

Link to comment
Share on other sites

a "scheduled task" which "monitors a folder" doesn't really make sense to me.  A scheduled task would be something that does some work on a routine schedule but "monitoring" a folder sounds like something that needs to hook into the file system directory watcher api.

 

If you want a true monitor, you don't need a scheduled task.

Link to comment
Share on other sites

chef

Excellent.  Is the File System Directory Watcher an Emby thing? Or is this a class library found in the OS?

 

I I think I should be able to trigger tasks after my plugin does it's thing, using the "ScheduledTaskWorker".

Edited by chef
Link to comment
Share on other sites

It is a function of the underlying OS but we abstract it to be cross-platform (not sure it works on all of them).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...