The job shop scheduling problem (JSSP) is a popular NP-hard scheduling problem that simulates the scheduling problems of different real-world applications in fields such as manufacturing, engineering, and planning. In general, many optimization-based scheduling algorithms are guaranteed to provide an optimal solution for small instances of the JSSP, but do not perform well with large instances of the JSSP. The hybrid cuckoo search and simulated annealing (CSA) algorithm is a new hybrid optimization algorithm for solving continuous optimization problems. It incorporates the optimization operators of the simulated annealing algorithm into the cuckoo search algorithm. In this paper, we present discrete CSA (DCSA) which is a discrete variation of CSA for solving the JSSP. DCSA incorporates four modifications into CSA. First, it uses the opposition-based learning method in the initialization step to produce diverse candidate solutions. Second, it uses a combination of the variable neighborhood search (VNS) and Levy-flight methods for better exploration of the search space. Third, it uses the elite opposition-based learning method before the abandon step of CSA to jump out of local optima. Finally, it uses the smallest position value with the JSSP to convert the continuous candidate solutions generated by CSA into discrete ones. DCSA was examined and compared to six popular optimization-based scheduling algorithms (DABC (Yin et al. in Sci Res Essays 6:2578-2596, 2011), PSO-VNS (Tasgetiren et al. in Int J Oper Res 3:120-135, 2006), DCS (Quaarab et al., in: Yang (ed) Recent advances in swarm intelligence and evolutionary computation, Springer, New York, 2015), GWO (Jiang and Zhang in IEEE Access 6:26231-26240, 2018), DWPA (Wang et al. in 2019 5th International Conference on Control, Automation and Robotics ICCAR 2019 581-585, 2019) and DGA (Kalshetty et al. in J Sci Res 64:310-321, 2020) using 34 JSSP instances from the OR-Library: Fisher and Thompson (3 instances), and Lawrence (31 instances). The experimental and statistical results indicate that DCSA converges faster to the Best-Known Solution for 29 instances out of the 34 tested JSSP instances and requires less computational time for the 34 tested instances than the computational times of the other algorithms.