Raynon
1
Hi All,
I am new to cronjob and need some guidance on this.
1) How do i enable a cronjob ?
Can it be done by "crontab mycronfile" or "crontab -e mycronfile"
2) How can i disable the cronjob?
Can deleting of the "mycronfile" disable the cron or do i need to perform "crontab -r mycronfile" ?
Raynon
3
Hi,
Is there any way that i can check whether the cron has been disabled or enabled ?
porter
4
If you mean the cron subsystem then do a check of the process list and see if cron is running. Otherwise it depends on your operating system.
If you mean your tasks, then do "crontab -l", if nothing is listed that does not start with # then you have nothing scheduled.
Raynon
5
Hi ,
I can't disable my cron. Can you help ?
Below is the error msg
$ crontab -r cronline
crontab: you are not a valid user (no entry in /etc/passwd).
porter
6
- What about
echo >empty
crontab ./empty
-
Are you listed in /etc/passwd ?
-
What are the rights to the /etc/passwd file? eg "ls -ld /etc/passwd"
-
What is the result of "id"?
Raynon
7
Does "crontab -r" remove all cronjobs regardless of which user id u are using ?
porter
8
Hopefully it only removes all for the current user. Also, why did you have an additional argument?