cron job issue

Status
Not open for further replies.

booker

Banned
Banned
158
2011
14
0
i have a issue with cronjob
i am on centos 6 64bit without control panel

i know how to create cronjob using
Code:
crontab -e


and i make the cron job for each min

Code:
1 * * * * /home/cgi-bin;./warez.pl /dev/null 2&1

i have a file name warez.pl and i want to run it each 1 min or each 2 min

my issue is
the commend tht i have is correct ?
as i know i dont need to add cd on the commend that right also do i need to add anything before /home/ ? like perl /home ?
 
Last edited:
3 comments
you have a small error after cgi-bin...

also make sure you have the directory correct..

1 * * * * /home/cgi-bin/warez.pl /dev/null 2&1

if it still does not work then "tail -f" the cron log to find the error it is creating to fix the issue.
 
you have a small error after cgi-bin...

also make sure you have the directory correct..

1 * * * * /home/cgi-bin/warez.pl /dev/null 2&1

if it still does not work then "tail -f" the cron log to find the error it is creating to fix the issue.

first ty for the fixing

but i guess tht commend still not working bcz i do need to add perl

so its should be
1 * * * * perl /home/cgi-bin/warez.pl /dev/null 2&1

also
tail -f show me
tail: warning: following standard input indefinitely is ineffective
 
perl is needed if the perl module is not automatically parsed.

Also tail -f cannot be used alone it has to be followed by a log file. (tail -f /etc/cron.d/somelogfile.log)
 
Status
Not open for further replies.
Back
Top