Auto-translated
The code was working, but for some reason, the task name didn't exist. Or rather, it was written in the Properties Tree, and the same was written in the script, but the console said that the task didn't exist. In the end, I copied the task name from the code, put it in the Properties Tree, and everything worked :D (perhaps the code was written in English, and the Properties Tree was written in American English, or vice versa).
Thank you very much; there are no more limits to creativity now.