In some automated container terminals, railway lines have been implemented into the port, saving container transfer time. However, the equipment scheduling level of the railway yard needs to be improved for managers. In the equipment scheduling of loading and unloading containers for railway trains, the operation modes “full unloading and full loading” and “synchronous loading and unloading” are often adopted. Due to the long length of the railway yard and the line of one train, there are two ways to arrange loading and unloading tasks for automated rail-mounted gantry cranes (ARMGs): one is to pre-assign tasks for ARMGs, and the other is to not pre-assign tasks for ARMGs. To investigate the efficacy of these different operation modes and methods of assigning tasks, this study formulated three mixed-integer linear programming (MILP) models with the goal of minimizing the ARMG task completion time. An adaptive large neighborhood search algorithm was used to tackle the scheduling problem. The scheduling effects of different operation modes and methods for assignment tasks were compared in terms of their calculation time and the completion time of ARMG tasks. Notably, the findings reveal that, with an increase in the number of tasks, the “pre-assign” task arrangement had a limited effect on the completion time of the ARMG tasks, made the calculation time shorter, and reduced the complexity of the problem. From the perspective of the completion time of ARMG tasks, the time under the “synchronous loading and unloading” operation mode was less than that of the “full unloading and full loading” operation mode. Therefore, it is recommended that the managers of the railway yard in an automated container terminal adopt the “synchronous loading and unloading” operation mode but determine the task assignment method according to decision time requirements. In addition, when the number of tasks is large, to decrease the time to complete ARMG tasks, the manager can adopt the “non-pre-assign” task distribution method.