This paper presents a novel multi-hierarchy and task-role based access control model named H-TRBAC. In the model, we create two multi-hierarchical sets, i.e., a role set and a task set. In the task hierarchy, a task may have some partial ordering relationships with other tasks. A task can not be scheduled until its entire ancestors are completed. It is the task??s duty to select necessary roles and permissions and assign a proper permission to a suitable role. The assignment process will be done only when the task is run, and permissions will be revoked just after the task turns to other states. At last, we give all the necessary operational functions to describe the structure of H-TRBAC, and detailed comparisons among our model and others are also given.