SpyTM Discussion Board

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

  RSS

Thushara Muralidharan
(@thushara-muralidharan)
Eminent Member
Joined:3 years  ago
Posts: 22
14/10/2015 4:07 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.


ReplyQuote
admin
(@jayavinoth)
Member Admin
Joined:4 years  ago
Posts: 110
16/10/2015 4:20 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


ReplyQuote
admin
(@jayavinoth)
Member Admin
Joined:4 years  ago
Posts: 110
22/10/2015 12:30 am  

@Thushara,

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


ReplyQuote
  
Working

Please Login or Register