Portal Home > Knowledgebase > Articles Database > Editing Cron jobs via SSH
Editing Cron jobs via SSH
Posted by kursed, 10-07-2008, 05:48 AM |
I've set up a cron job in /etc/crontab - how can I edit the time on it via SSH?
|
Posted by me00, 10-07-2008, 06:10 AM |
Use 'crontab -u username -e' to edit the crons for a certain user.
|
Posted by kursed, 10-07-2008, 06:44 AM |
I'm using the following command:
But I can't seem to find it while editing the crontab.
|
Posted by me00, 10-07-2008, 06:57 AM |
You may use "vi" editor to modify this.
|
Posted by kursed, 10-07-2008, 06:58 AM |
How do I do that?
|
Posted by RoseHosting, 10-07-2008, 07:04 AM |
You can also use "MC". To start it, just type, "mc" on your command line.
Also, you can edit your "crontab" file using the following command:
mcedit /etc/crontab
If you do not have this program installed, you can install it, using the following commands:
on RPM base distributions as: CentOS, Fedora etc...
yum -y install mc
On DEB based distributiond as: Debian, Ubunut etc...
apt-get -y install mc
|
Posted by steveks, 10-07-2008, 07:08 AM |
Just do crontab -e
If you are not able to change there. Then do as below.
cd /var/spool/cron
vim username (Probabaly root)
then change as you wish. Then press escape and :wq
restart cron service crond restart
|
Posted by kursed, 10-07-2008, 07:13 AM |
Exactly what time is the following cron job running at? And Rose - that worked beautifully, thank you.
50 3 * * * root sync -avz -e ssh /folder name@name.bqbackup.com:foldername
|
Posted by david510, 10-07-2008, 07:21 AM |
The cron will execute every day at 03:50 server time.
|
Posted by kursed, 10-07-2008, 07:26 AM |
Thank you!
|
Posted by MiteshGanatra, 08-19-2013, 12:31 PM |
In ssh, run crontab -e and insert “*/1 * * * * rdate -s rdate.cpanel.net" and save it.
Mitesh Ganatra
Last edited by MiteshGanatra; 08-19-2013 at 12:36 PM.
|
Add to Favourites Print this Article
Also Read
propay.com (Views: 712)