All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His Slave and Messenger.
It is permissible for an employee to work for a salary outside the working hours agreed upon between him and his employer, unless the employer makes a condition in the contract, for a certain reason, that the employee does not work in another job at all even during his free time and the employee agrees to this condition in the contract. In this case, he is obliged to abide by those terms as it is confirmed that the Prophet said: "Muslims abide by their conditions.” [Abu Daawood]
Therefore, if the second job is not at the time of the first job (i.e. outside the working hours) and there are no terms against it, then it is permissible to take that job and benefit from the salary obtained for it; otherwise, it is not.
Allaah Knows best.