hosts
hosts copied to clipboard
[Feature request] Temporary entries with auto-deletion using crontabs
Sometimes you are testing or waiting for some domain to update its DNS and you add your domain to your hosts but often you forgot to delete that entry. I suggest some syntax as parameters to the add command like this:
hosts add --autoremove --time=30m 10.12.13.14 example.com
This command should schedule a crontab job in 30m to run hosts remove example.com
@scratchmex Interesting idea! I'll look into it. Another option for implementation could be the at utility:
- https://pubs.opengroup.org/onlinepubs/9699919799/utilities/at.html
- https://stackoverflow.com/a/30378554
Actually that utility does what I was referring to not crontab. Awesome!