How to fix crontab:...
 

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

3 Posts
1 Users
0 Likes
2,235 Views
Avatar of admin
(@mjv119gmail-com)
Estimable Member Admin
Joined: 10 years ago
Posts: 79
Topic starter  

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.


   
ReplyQuote
Avatar of admin
(@mjv119gmail-com)
Estimable Member Admin
Joined: 10 years ago
Posts: 79
Topic starter  

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


   
ReplyQuote
Avatar of admin
(@mjv119gmail-com)
Estimable Member Admin
Joined: 10 years ago
Posts: 79
Topic starter  

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


   
ReplyQuote

Leave a reply

Author Name

Author Email

Title *

Preview 0 Revisions Saved
Share: