I placed a lectern and a jobless villager took the profession.When I break the lectern, the villager will not lose his job and i have not traded with him. i had to wait a long while for him to lose the job
Related issues
Comments


Villagers can only loose their profession between 2000 tick and 9000 tick ingame time, (8AM and 3PM) provided they have not been traded with and there are no other jobsite block corresponding with their profession that they are able to path to.
To see what time it is ingame, type this command in the chat "/time query daytime"
Duplicate of MC-153617
What time of day was it when you set the lectern down? If it was just before 17:00 (11000 time) then the villager most likely was not on the clock when you removed the lectern, forcing them to keep their profession until the next morning at 06:00 (0000 time).
https://minecraft.gamepedia.com/Villager#Schedules