XFileSharing Pro - Cron.pl giving an error. Please help :(

Message
Author
filedownload
Posts: 10
Joined: Jul 26, 2012 10:55 pm

Cron.pl giving an error. Please help :(

#1 Postby filedownload » Jul 28, 2012 4:16 pm

Hello,

Below is the error that I receive when I try to run the cron.pl

Code: Select all

Deleting symlinks for SRV=1...Done.
Checking server s1...OK
Software error:

can't write to Templates/static/last_news.html at /home/file/public_html/cgi-bin/cron.pl line 213.
For help, please send mail to the webmaster ([email protected]), giving this error message and the time and date of the error.
Admin please help.

Thank you.

DataJihad
Posts: 3
Joined: Jul 26, 2012 11:18 am

#2 Postby DataJihad » Jul 28, 2012 4:39 pm

Let us know more info, run the following command : sudo crontab -l

Maybe you do not run your cron on the right user..

filedownload
Posts: 10
Joined: Jul 26, 2012 10:55 pm

#3 Postby filedownload » Jul 28, 2012 5:09 pm

DataJihad wrote:Let us know more info, run the following command : sudo crontab -l

Maybe you do not run your cron on the right user..

The output i got is below:

Code: Select all

root:~# sudo crontab -l
# 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
0       *       *       *       *       cd /home/file/public_html/cgi-bin;./cron.pl >/dev/null 2>&1
0       0       *       *       *       cd /home/file/public_html/cgi-bin;./cron_deleted_email.pl >/dev/null 2>&1

DataJihad
Posts: 3
Joined: Jul 26, 2012 11:18 am

#4 Postby DataJihad » Jul 28, 2012 5:16 pm

try replacing your 2 lines with the following :

0 * * * * ./home/file/public_html/cgi-bin/cron.pl >/dev/null 2>&1
0 0 * * * ./home/file/public_html/cgi-bin/cron_deleted_email.pl >/dev/null 2>&1


you did not have to change dir in cron, you must specify full path in your command. If that doesnt work remove dot in front of /home

Best regards

admin
Site Admin
Posts: 1839
Joined: Mar 22, 2006 12:32 pm

#5 Postby admin » Jul 28, 2012 5:33 pm

DataJihad wrote:try replacing your 2 lines with the following :

0 * * * * ./home/file/public_html/cgi-bin/cron.pl >/dev/null 2>&1
0 0 * * * ./home/file/public_html/cgi-bin/cron_deleted_email.pl >/dev/null 2>&1


you did not have to change dir in cron, you must specify full path in your command. If that doesnt work remove dot in front of /home

Best regards

That's totally wrong and will not work. You must do a "cd" first.

filedownload
Posts: 10
Joined: Jul 26, 2012 10:55 pm

#6 Postby filedownload » Jul 28, 2012 6:22 pm

admin wrote:
DataJihad wrote:try replacing your 2 lines with the following :

0 * * * * ./home/file/public_html/cgi-bin/cron.pl >/dev/null 2>&1
0 0 * * * ./home/file/public_html/cgi-bin/cron_deleted_email.pl >/dev/null 2>&1


you did not have to change dir in cron, you must specify full path in your command. If that doesnt work remove dot in front of /home

Best regards

That's totally wrong and will not work. You must do a "cd" first.

So what to do then admin?

applewar
Posts: 67
Joined: Feb 08, 2011 4:21 am

#7 Postby applewar » Jul 29, 2012 2:44 pm

Is it works when you launch them manually with root user ?