A key challenge in the design space of fog computing systems is online task scheduling, i.e., to allocate multiple types of resources to pending tasks that are constantly generated from end devices. It is challenging because of the online, intensive, and time-varying nature of task arrival, the varieties in the amounts and durations of task resource demands, as well as the unattainability of such priori information due to the online nature of task arrivals. To handle such uncertainties, an online task scheduler design with flexibility to process sequences of task arrivals with variable lengths is highly demanded. Existing works have adopted deep reinforcement learning (DRL) techniques to develop online task schedulers in a data-driven fashion by constructing them as neural networks and training using empirical data. However, hindered by the intrinsic restriction of the underlying neural network design, such schedulers often suffer from poor flexibility that may induce resource under-utilization, or overly fine-grained control that induces considerable overheads. In this paper, we address the above challenges by integrating pointer network architecture with the scheduler design, and proposing Neural Task Scheduling (NTS), an online flexible task scheduling scheme which effectively reduces average task slowdown to facilitate best quality-of-service. Simulation results show that NTS consistently outperforms state-of-the-art schemes under different settings.