How to fix crontab: can’t open your crontab file.

Home Questions How to fix crontab: can’t open your crontab file.

Tagged: 

This topic contains 2 replies, has 3 voices, and was last updated by   2 years, 4 months ago.

  • Author
    Posts
  • #6646 Reply

    Thushara Muralidharan
    Participant
    Offline
    Topics: 12
    Replies: 10

    Hi Experts,
    In UNIX, I tried to open a crontab file with -l option but getting below error.

    >crontab -l
    crontab: can’t open your crontab file.

    please help.. I need the fix immediately since it holding my automation work.

  • #6727 Reply

    admin
    Keymaster
    Offline
    Topics: 65
    Replies: 65

    It looks like that the crontab file is empty. Add the job to the crontab file and try again.

    How to add job to crontab file:
    1. Add the jobs list in any txt file.
    2. Use that txt file to add in crontab file as below and try again with your crontab -l command.

    $crontab txtfile

  • #6728 Reply

    admin
    Keymaster
    Offline
    Topics: 65
    Replies: 65

    @Thushara,

    If Dharini’s fix not work, then just add an extra empty line at the end of the cron file.

Reply To: How to fix crontab: can’t open your crontab file.

You can use BBCodes to format your content.
Your account can't use Advanced BBCodes, they will be stripped before saving.

Your information: