This is the easiest way
PHP Code:
set_task(1.0, "Pause", my_variable)
However, this also sets the task ID to this value so it depends on if you need to reference the task later or if you have other tasks that have the same ID.
The data parameter is treated like a string so there are ways to use it but if you can get away with just using the ID then that should work just fine.
__________________