It is currently Fri Jan 15, 2021 9:58 pm
All times are UTC + 8 hours

Cronjobs

Web hosting, MySQL, PHP and all that good stuff.

Cronjobs

Postby aj2 » Wed Nov 27, 2013 10:52 pm

Hello,
I installed Spotweb on the AS-604T. This runs fine. I need to create a cronjob to update the database automatically. Now I have update manually by activating retrieve.php
Lazy as I am I want to do this with a cron task. Where can I edit the cron file?

Thanks.
Another Day At The Office
aj2
 
Posts: 38
Joined: Sat Nov 23, 2013 5:54 pm
Location: Netherlands

Re: Cronjobs

Postby WOODY@AST » Thu Nov 28, 2013 11:30 am

Hi here,
Please use putty or "Shell in A Box" App login NAS
crontab file path: /usr/builtin/etc/crontabs/

Thanks!!! :D
Storage: AS5104T
USB Speaker: Logitech Z105
Network: BUFFALO WZR-HP-G450H & Netgear R7500
Laptop: Apple MACBOOk AIR: OS X Mountain Lion & Windows 7 64-bit Ultimate
Media Player: ASUSTOR NAS with KODI
Portable: The NEW HTC ONE & Sony Xperia Z3, iPhone 3GS & iPad
User avatar
WOODY@AST
 
Posts: 101
Joined: Tue Jun 19, 2012 11:51 pm

Re: Cronjobs

Postby aj2 » Thu Nov 28, 2013 4:52 pm

Thank you.


Using Putty. I will give it a try.
Now I have added this line to the file root:
Code: Select all
#Spotweb Updater
*/10 * * * * root cd /volume1/Web/spotweb && /volume0/usr/builtin/bin/php retrieve.php > /dev/null


Hope it works

Thanks again.

Cheers
Another Day At The Office
aj2
 
Posts: 38
Joined: Sat Nov 23, 2013 5:54 pm
Location: Netherlands

Re: Cronjobs

Postby aj2 » Thu Nov 28, 2013 7:59 pm

It works

Adding the following code to the file named "root" in:

Code: Select all
/volume0/usr/builtin/etc/crontabs


Add the following line to it:

Code: Select all
1,31, * * * * /volume0/usr/builtin/bin/php /volume1/Web/spotweb/retrieve.php


Now spotweb is updating every half hour.

To restart the cron, enter in Putty

Code: Select all
/etc/init.d/S41crond stop
/etc/init.d/S41crond start


Tnx
Another Day At The Office
aj2
 
Posts: 38
Joined: Sat Nov 23, 2013 5:54 pm
Location: Netherlands

Re: Cronjobs

Postby WOODY@AST » Thu Nov 28, 2013 11:40 pm

Good Job!!! :D
Storage: AS5104T
USB Speaker: Logitech Z105
Network: BUFFALO WZR-HP-G450H & Netgear R7500
Laptop: Apple MACBOOk AIR: OS X Mountain Lion & Windows 7 64-bit Ultimate
Media Player: ASUSTOR NAS with KODI
Portable: The NEW HTC ONE & Sony Xperia Z3, iPhone 3GS & iPad
User avatar
WOODY@AST
 
Posts: 101
Joined: Tue Jun 19, 2012 11:51 pm

Return to Web Hosting

  • You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot post attachments in this forum
  • Who is online

    Users browsing this forum: No registered users and 2 guests