Problem with scheduled task in my plugin

hello there, i added a scheduled task and its handler. i also defined them in services.xml file.
the status of scheduled task is scheduled at first but after the next_execution_time is passed the status is changed to queued automatically. Also the code i added in the task handler run() is also not working.
is ther something i am missing. And i used the bin/console messenger:consume and bin/console scheduled-task:run in command line but did not see my task name there. is there a way to test if my scheduled task is working?

P.S. i have already refered to the documentation of creating a scheduled task but it did not prove to be useful