cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in giving input to crontab

Former Member
0 Kudos

Hi,

I am using the command

 
crontab -e

which asks for the input. I changed the editor to gedit using


export VISUAL="gedit"

so `crontab -e` is opened using gedit. I want to give input to crontab through a file. for eg :1.txt

i tried


crontab -e </root/1.txt

but its not working. I need a way to give input to crontab using a file

Accepted Solutions (0)

Answers (1)

Answers (1)

markus_doehr2
Active Contributor
0 Kudos

crontab -e <filename>?

Markus

Former Member
0 Kudos

Thats not working Markus

markus_doehr2
Active Contributor
0 Kudos

What operating system are you using?

Markus

markus_doehr2
Active Contributor
0 Kudos

Just as additional info:


Solaris:
========

% crontab -l
crontab: can't open your crontab file.

% cat test.cron 
00 12 * * * /tmp/test.sh

% crontab test.cron 

% crontab -l
00 12 * * * /tmp/test.sh


HP-UX:
======

$ crontab -l
crontab: can't open your crontab file.

$ cat test.cron 
00 12 * * * /tmp/test.sh

$ crontab test.cron 
warning: commands will be executed using /usr/bin/sh

$  crontab -l
00 12 * * * /tmp/test.sh


Linux:
====

$ crontab -l
no crontab for bitadm

$ cat test.cron 
00 12 * * * /tmp/test.sh

$ crontab test.cron

$ crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (test.cron installed on Sun May 18 17:25:00 2008)
# (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
00 12 * * * /tmp/test.sh

Former Member
0 Kudos

Thanks Markus... Its working now...