There are a few factors affecting how long a dehumidifier will need to run. Another thing to consider is choosing the right size dehumidifier for your space; the bigger the room, the more air it will need to process. If yours doesn't have this, a hygrometer like this SMARTRO SC42 Professional Digital Hygrometer can help you check the humidity levels in your home. You can even get a humidistat, which works with your HVAC system and acts as a thermostat for indoor humidity levels. Whatever dehumidifier you're using, you'll get a sense of how long to run it after a few test runs at home.