Skip to main content

How to Find Which Accounts have Cron jobs added

Comments

3 comments

  • kodeslogic
    You can create a script to fetch list of all cronjobs.. 1. SSH your server with root user 2. Create a file "getcronlist.sh" with following code into this file: #!/bin/bash cd /var/spool/cron ls -1 > /root/userscronjobs.txt for i in `cat /root/userscronjobs.txt` do echo "######For the user $i######" >> /root/cron_list.txt echo "" >> /root/cron_list.txt cat $i >> /root/cron_list.txt echo "" >> /root/cron_list.txt echo "###########################" >> /root/cron_list.txt echo "" >> /root/cron_list.txt done
    3. Execute "getcronlist.sh" ./getcronlist.sh
    4. Now you can view the result from "/root/cron_list.txt" cat /root/cron_list.txt
    0
  • cPanelLauren
    Let us know if @kodeslogic suggestion works for you @piyushmaheswari, thank you @kodeslogic
    0
  • Bogdan-Ciocoiu
    Let us know if @kodeslogic suggestion works for you @piyushmaheswari, thank you @kodeslogic

    It does; thank you, kodeslogic. Best wishes, Bogdan Ciocoiu www.pmunit.com
    0

Please sign in to leave a comment.