Cron Jobs or Scheduled task on Windows Servers

I have been asked by our command center if they can look at cronjobs jsut to read them for trouble shooting? is this possible?

If not, they would like to know if they put a text file of the cronjob in a folder can we read it for them. They want to be able to see it without going to the server. Maybe even drop it in the same folder where we read the configurationdocument cit?


The other question is about being able to list the scheduled tasks on a windows server?


Thanks in advance


  • Roger;


    For UNIX, the command you're looking for would be crontab -l   (which lists the cron jobs for a user).  You would have to run crontab for each user (perhaps something like this:

    for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done

    This would go through the /etc/passwd file and get all users to run crontab for that user.  For windows, you can use the command line 'at' command:


    c:\>at 08:00 /every:M,T,W,Th,F "cmd /c copy /Q c:\test.txt c:\test\test.txt"
    Added a new job with job ID = 1

    Status ID   Day                     Time          Command Line
            1   Each M T W Th F         8:00 AM       "cmd /c copy /Q c:\test.txt c:\test\test.txt"


    Running 'at' shows the scheduled windows jobs.


    Best Regards;


    Keith Paschal

    HP UCMDB Support