The railway that connects Pekalongan from Semarang operates 14 times daily; while the line from Jakarta to Pekalongan operated 7 times daily. Alternatively, you can take the train from Jogjakarta, Surabaya, or Bandung. Please check Kereta Api Indonesia website to book.