Problem with Task scheduled

Hi all, I want to create a scheduled task, I created a service in the core module that has an interface and has a parameter type “string” when I go to the menu scheduling task, this bean not show me, what I am doing wrong ?.
Thanks and regards.
attached images

Captura de pantalla 2016-07-27 a las 13.20.41

Captura de pantalla 2016-07-27 a las 13.21.06

Your bean should be annotated with @Component, not @Service. Services are not supported in scheduled tasks because it would break the recommendation of not invoking a service from inside middleware.
It is not clearly stated in the documentation now, so we will fix the docs, thanks for the hint.

Thank you Konstantin this perfect, I would like to ask opinion on this functionality if I can not solve:

  1. I have a class @Component send a file via ftp
  2. This class accepts as a parameter a string with the name of the file to send
  3. I would like to put this class as a Task Scheduler
    The problem is that you should be able to put several times this kind in the Task Scheduler to run at different times or at the same time passing as parameter different filenames, but can run simultaneously because it really would be sending different files received as parameters.
    That is: the same class would be executed for example at 13:15 passing as parameter the filename “file1” and can run the same class at 13:15 passing as file name “file2”. I have read the documentation that does not run again if a class is already active in the scheduler, am I right? and if so is there any way to solve it ?.
    Thank you for your attention and greetings.

> I have read the documentation that does not run again if a class is already active in the scheduler, am I right?
Not quite. If you specify 2 tasks for the same bean method at the same time, they will run simultaneously. The scheduling mechanism ensures not running the same task twice, regardless of what this task invokes.

Consider also creating a separate entity which would store some settings for what task should do what. Then your bean could use this additional information when invoked from the scheduled task.

Hope this helps.

Clear and concise, thanks