ripper
1 week ago

Unable to create cron job [SOLVED]
5  83 {{tagitem.name}}
Can I create cron job with my FREE shell account ?

I tried these.

[email protected]:~$ cat ./the_thing_i_need_to_run
echo SUPER_SECRET_HIGHLY_CLASSIFIED_TEXT >> /home/r/my_user_name/hehe.he
[email protected]:~$ cat cron_job
1 * * * * bash /home/r/my_user_name/the_thing_i_need_to_run
[email protected]:~$ ls -la
total 48
drwx------ 3 my_user_name users 4096 Jun 11 17:05 .
drwxr-xr-x 529 root root 20480 Jun 11 16:55 ..
-rw-r--r-- 1 my_user_name users 220 Jun 11 16:55 .bash_logout
-rw-r--r-- 1 my_user_name users 3526 Jun 11 16:55 .bashrc
-rw-r--r-- 1 my_user_name users 54 Jun 11 17:05 cron_job
-rw-r--r-- 1 my_user_name users 675 Jun 11 16:55 .profile
-rw-r--r-- 1 my_user_name users 67 Jun 11 17:03 the_thing_i_need_to_run
drwxr-xr-x 2 my_user_name users 4096 Jun 11 16:59 .tmp
[email protected]:~$ crontab ./cron_job
crontab: crontabs/tmp.aIuQQ9: No space left on device

I have not used even 1 mb. So, I have enough space left, right ?

What does it mean by 'No space left on device' ?

Can anyone help me out ?
You are doing it wrong. You need to add the cronjob in the crontab file.

First run crontab -e

Then add the cron entry to the file of crontab.

Then save the file.

You can find more information about crontab here.
Staff Som    1 week ago
I tried that too.



[email protected]:~$ crontab -e

__________________________________________________________________________________________________________________________________________
GNU nano 2.7.4 File: /tmp/crontab.P6lsBP/crontab Modified
------------------------------------------------------------------------------------------------------------------------------------------------------------
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
1 * * * * bash /home/r/ripper/still_a_n00b.sh

___________________________________________________________________________________________________________________________
File Name to Write: /tmp/crontab.P6lsBP/crontab
------------------------------------------------------------------------------------------------------------------------------------------------------------
^G Get Help M-D DOS Format M-A Append M-B Backup File
^C Cancel M-M Mac Format M-P Prepend ^T To Files
-----------------------------------------------------------------------------------------------------------------------------------------------------------



##### after saving the file




no crontab for ripper - using an empty one
crontab: installing new crontab
crontab: crontabs/tmp.EZTc3Q: No space left on device
crontab: edits left in /tmp/crontab.P6lsBP/crontab




##### I guess cron was unable to write to /var/spool/cron/crontabs/ripper





[email protected]:~$ cat /tmp/crontab.P6lsBP/crontab
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
1 * * * * bash /home/r/ripper/still_a_n00b.sh

[email protected]:~$ crontab -l
no crontab for ripper

Can you help me out ?

Thanks in advance
ripper    1 week ago
Try again crontab -e now. It should work fine. We have fixed the space issue.

[Please note : From the next time, if you are showing some error messages/logs more than 3 lines, please use a paste tool here. It helps in keeping the forum clean.]
Staff Som    7 days ago
Thanks. crontab is working now. :-)

I didn't know about the PASTE TOOL.
ripper    7 days ago
You're welcome :D
Staff Som    7 days ago

Please Login or Sign Up to leave a reply.