每当你创建一个任务的时候,会在循环里里加入一个定时事件,在时间到的时候往你指定的 ip 和端口发一条消息。
rpc once 1000 localhost:8001 {message}
rpc repeat 1000 localhost:8001 {message}
del :timeId
支持 unix 时间戳
rpc once 1461216640000 localhost:8001 {message}
github: https://github.com/flex1988/redis-task
可以做到毫秒级的精度和低 cpu 。
大家觉得这个思路怎么样
rpc once 1000 localhost:8001 {message}
rpc repeat 1000 localhost:8001 {message}
del :timeId
支持 unix 时间戳
rpc once 1461216640000 localhost:8001 {message}
github: https://github.com/flex1988/redis-task
可以做到毫秒级的精度和低 cpu 。
大家觉得这个思路怎么样