Nuke Script and Deadline

i made a .py script that has some render events for write nodes and it is saved in the .nuke folder on my disk(and it is also installed on the farm computers).On my pc it is working perfectly with nuke(and when a use the farm’s pcs manually it also works) but when i send my project to deadline,the render events won’t work and deadline’s job report says something like “Error: nameError: name ‘NameOfMyScript’ not defined”.

I guess deadline is not being able to find my .py file but how do i fix that? thanks!