LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to create a cron job and run it ,give simpleexample (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-create-a-cron-job-and-run-it-give-simpleexample-773171/)

ramakrishnankt 12-04-2009 02:57 AM

Quote:

Originally Posted by druuna (Post 3779331)
Hi,

2 things:

1) You don't need to put the root user in the cron.allow file, root is all powerful. I initially thought you were talking about a normal user.

2) Another way of putting the username into /etc/cron.allow (as root):
echo "username" >> /etc/cron.allow

After that, just in case:
chmod 600 /etc/cron.allow

Hope this helps.

Hi, following is occurs
node2@node2-prudence:~$ echo "username" >> /etc/cron.allow
bash: /etc/cron.allow: Permission denied
node2@node2-prudence:~$ echo "node2" >> /etc/cron.allow
bash: /etc/cron.allow: Permission denied
node2@node2-prudence:~$ chmod 600 /etc/cron.allow
chmod: cannot access `/etc/cron.allow': No such file or directory


node2@node2-prudence:~$ sudo su
sudo: must be setuid root


Thanks

druuna 12-04-2009 03:44 AM

Hi,

As I stated before (post #8): it looks like something was not installed correctly (the setuid thingy). Maybe an Ubuntu user can help you with that one.

If you have the root password you can also do: su - (and type the root password).

You do need to have root access to create/change the /etc/cron.allow file, so the setuid problem needs to be fixed first (if the su - option is not possible).

Hope this helps.

ramakrishnankt 12-04-2009 04:59 AM

Thanks druuna
i want to do it in another system,
i have to set cron job for daily at specified time to execute automatically klinkstatus to checking a website's links
and mail its output in html format. how to do it..

Thanks again
Ramakrishnan

druuna 12-04-2009 07:52 AM

Hi again,

This thread shows you how to set up a cron job. Please use your other thread (klinkstatus problem) to solve that problem.


All times are GMT -5. The time now is 11:58 PM.