Reputation: 1553
Im trying to setup my script which downloads files to my PC, I want it to run every minute it doesn't seem to be working at the moment.
When i run the command in terminal the file downloads perfectly.
Full Image: https://i.sstatic.net/opxNt.png
Upvotes: 0
Views: 3599
Reputation: 171
You can install bootstrap(If your NAS model support bootstrap) and then install ipkg, then install crond. This crond work well like any other linux, unix systems.
Do not use the default crontab of synology DSM.
Upvotes: 0
Reputation: 3972
* * * * * root /usr/bin/php argument
will run every minute. But passing arguments into a command inside cron is not something I would recommend. Why not create a very simple shell script:
vi /usr/local/bin/myphpthing
that includes just this
/usr/bin/php myarguments
make the file executable
chmod +x /usr/local/bin/myphpthing
And create a cronjob like this
* * * * * root /usr/local/bin/myphpthing
Do remember to restart crontab service otherwise these changes will not be picked up. Alternatively just restart the box.
In addition running something every minute on a Synology NAS box is perhaps not something I would recommend. The disks will then never suspend. And whatever your php script does might sometimes not finish in time for the next to start and you might then have conflicts and locks.
Upvotes: 1