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

3 Views
Reply
L
Legacy User 1
8/1/2019, 5:21:36 AM

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.

2 Replies

L
Legacy User 1
8/1/2019, 5:22:00 AM

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

L
Legacy User 1
8/1/2019, 5:22:18 AM

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

Leave a Reply

All replies are subject to pre-moderation. Your reply will appear publicly once approved.

S
SPYTM

Experience the pinnacle of digital communication. The ultimate ultra-premium platform designed for those who demand excellence.

© 2026 SPYTM. All rights reserved.