With Slayer, there's three main AFK ways that you can train.
The first is very simple and self-explanatory, and that is on any task where the monster is aggressive, and you can AFK for 10 minutes before they lose aggression.
The second is with a Dwarf Multicannon, and if you want to AFK the longest, you should stand underneath your cannon, so it only uses cannonballs to hit the monsters once, rather than constantly shooting.
Lastly, if monsters aren't aggressive, and you can't cannon them, but they're in a multi-combat area, you can use High Defense Gear or Protection Prayers, and attack a lot of them at once to AFK for a few minutes at a time.
留言